function CopyToClipboard()
{
   document.Form_orkut.orkut.focus();
   document.Form_orkut.orkut.select(); 
   CopiedTxt = document.selection.createRange();
   CopiedTxt.execCommand("Copy");
}

function abrir_janela_popup(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function CheckForm () {
	if (document.indica.seunome.value==""){
		alert("O SEU NOME é obrigatório");
		return false;
	}
	if (document.indica.seuemail.value==""){
		alert("O SEU E-MAIL é obrigatório");
		return false;
	}
	var mail = document.indica.seuemail.value;
	if(mail != ""){
		if(mail.indexOf('@',0) == -1 || mail.indexOf('.',0) == -1){
		alert("O SEU E-MAIL não existe ou você digitou errado.");
		document.indica.seuemail.value="";
		document.indica.seuemail.focus();
		return false;
		}
	}
	if (document.indica.paraemail.value==""){
		alert("O E-MAIL DA VÍTIMA é obrigatório");
		return false;
	}
	var mail = document.indica.paraemail.value;
	if(mail != ""){
		if(mail.indexOf('@',0) == -1 || mail.indexOf('.',0) == -1){
		alert("O E-MAIL DA VÍTIMA não existe ou você digitou errado.");
		document.indica.paraemail.value="";
		document.indica.paraemail.focus();
		return false;
		}
	}		
	return true
}

function limpacampo () {
	document.indica.paraemail.value="";
	document.indica.paraemail.focus();
	}

function chPager () {
			var mail = document.pagerform.email.value;
			if(mail != ""){
			if(mail.indexOf('@',0) == -1 || mail.indexOf('.',0) == -1){
				alert("Este e-mail não existe ou você digitou errado.");
				document.pagerform.email.value="";
				document.pagerform.email.focus();
				return false;
				}
			}
			if(mail == ""){
				alert("Digite seu e-mail, por favor.");
				document.pagerform.email.value="";
				document.pagerform.email.focus();
				return false;
 				}
				return true;
			}

function chPager2 () {
			var mail = document.pagerform2.email2.value;
			if(mail != ""){
			if(mail.indexOf('@',0) == -1 || mail.indexOf('.',0) == -1){
				alert("Este e-mail não existe ou você digitou errado.");
				document.pagerform2.email2.value="";
				document.pagerform2.email2.focus();
				return false;
				}
			}
			if(mail == ""){
				alert("Digite seu e-mail, por favor.");
				document.pagerform2.email2.value="";
				document.pagerform2.email2.focus();
				return false;
 				}
				return true;
			}
			
MAXCHARACTERS = 300;
function CheckLen(target)
{
  CharsLeft = MAXCHARACTERS;
  StrLen = target.value.length;
  if (target.name == "mensagem")
  {
    if (StrLen == 1 && document.pagerform.mensagem.value.substring(0,1) == " ")
    {
        document.pagerform.mensagem.value = "";
        StrLen = 0;
    }
    StrLen = StrLen + document.pagerform.callback.value.length + document.pagerform.nome.value.length;
    if (StrLen > MAXCHARACTERS)
    {
       document.pagerform.mensagem.value = document.pagerform.mensagem.value.substring(0,document.pagerform.mensagem.value.length-1);
       CharsLeft = 0;
    }
    else
    {
      CharsLeft = CharsLeft - StrLen;
    }
  }
  else if (target.name == "nome")
  {
    if (StrLen == 1 && document.pagerform.nome.value.substring(0,1) == " ")
    {
       document.pagerform.nome.value = "";
       StrLen = 0;
    }
    StrLen = StrLen + document.pagerform.callback.value.length + document.pagerform.mensagem.value.length;
    if (StrLen > MAXCHARACTERS)
    {
       document.pagerform.nome.value = document.pagerform.nome.value.substring(0,document.pagerform.nome.value.length-1);
       CharsLeft = 0;
    }
    else
    {
       CharsLeft = CharsLeft - StrLen;
    }
  }
  else
  {
    if (StrLen == 1 && document.pagerform.callback.value.substring(0,1) == " ")
    {
        document.pagerform.callback.value = "";
        StrLen = 0;
    }
    StrLen = StrLen + document.pagerform.mensagem.value.length + document.pagerform.nome.value.length;
    if (StrLen > MAXCHARACTERS)
    {
        document.pagerform.callback.value = document.pagerform.callback.value.substring(0,document.pagerform.callback.value.length-1);
        CharsLeft = 0;
    }
    else
    {
        CharsLeft = CharsLeft - StrLen;
    }
  }
  document.pagerform.totalCounter.value = CharsLeft;
}

function limpar_texto_3()
{
    if (document.pagerform.mensagem.value == "Digite sua mensagem aqui.")
    {
        document.pagerform.mensagem.value = "";
    }    
}

	
			n = (document.layers) ? 1 : 0;
			ie = (document.all) ? 1 : 0;
			ver4 = (n || ie) ? 1 : 0;
			
			var n6 = ((document.getElementById)&&(!ie)) ? 1 : 0;   
			var maxLen = 450;
			var enable;
			var session = true;
			var now_date = new Date();
			var cookie_date = new Date();
			
		function remove_minus(str)
			{
			  var i;
				var back = "";
		
			  for (i = 0; i < str.length; ++i) {
					if (str.substring(i,i+1) != "-") {
						back += str.substring(i,i+1);
					}
				}
		
				return back;
			}
			
				
		function iRandom(iMax) 
			{
				var now=new Date();
				var time=now.getTime();
				return ((time/10) % iMax);
			}
				
					
	function chPagerNP () {
		
		    var name = document.pagerform.nome.value;
			var msg = document.pagerform.mensagem.value;
			var mail = document.pagerform.email.value;
			
			if(name==""){
				alert("Digita seu nome aí, por favor.");
				document.pagerform.nome.focus();
				return false;
				}
			
			if(mail != ""){
			if(mail.indexOf('@',0) == -1 || mail.indexOf('.',0) == -1){
				alert("Este e-mail não existe ou você digitou errado.");
				document.pagerform.email.value="";
				document.pagerform.email.focus();
				return false;
				}
			}
			if(mail == ""){
				alert("Digita seu e-mail, por favor.");
				document.pagerform.email.value="";
				document.pagerform.email.focus();
				return false;
			}
			if(msg==""){
				alert("Você esqueceu de digitar a mensagem.");{
				document.pagerform.mensagem.focus();
				return false;
				}
				
				return true;
			}
		}			

function correctPNG()
   {
   for(var i=0; i<document.images.length; i++)
      {
      var img = document.images[i]
      var imgName = img.src.toUpperCase()
      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText
         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
         var strNewHTML = "<span " + imgID + imgClass + imgTitle
         + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
         + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
         img.outerHTML = strNewHTML
         i = i-1
         }
      }
   }
   window.attachEvent("onload", correctPNG);
