// JavaScript Document
//script1

function resize_iframe() {
 var height=screen.availHeight;//Firefox
	    if (screen.height)
	    {
		    height=screen.availHeight;//IE
	    }
       var el=document.getElementById("scdiv");  
       if (screen.width<=800 && screen.height<=600)
	   {
	    el.style.height=parseInt(height-document.getElementById("scdiv").offsetTop-400)+"px";   
	   }
	   else  if (screen.width==1024  && screen.height==768)
	   {	  
	   el.style.height=parseInt(height-document.getElementById("scdiv").offsetTop-400)+"px"; 
	  }
	   else  if (screen.width==1152 &&  screen.height==864)
	   {
	   el.style.height=parseInt(height-document.getElementById("scdiv").offsetTop-385)+"px"; 
	   }
	   else  if (screen.width==1280||screen.height==600)
	   {
	    el.style.height=parseInt(height-document.getElementById("scdiv").offsetTop-385)+"px"; 
	   }
	  else
	   {
	    el.style.height=parseInt(height-document.getElementById("scdiv").offsetTop-440)+"px"; 
	   }	
	   if(document.getElementById("txtvername").value =="IE")
	   {
	   }
	   else if(document.getElementById("txtvername").value =="Firefox")
	   {
	   if (screen.width==1024  && screen.height==768)
	   {
	   el.style.height=(parseInt(el.style.height)+20) +"px";
	   }
	   }
	   else if(document.getElementById("txtvername").value =="AppleMAC-Safari")
	   {
	    if (screen.width==1024  && screen.height==768)
	   {
	   el.style.height=(parseInt(el.style.height)+55) +"px";
	   }
	   else 
	   {
	    el.style.height=(parseInt(el.style.height)+40) +"px";
	   }
	    el.style.width="1020px";
	   }
	   else
	   {
	   }
	   //setProcessFrameHeight();   
 }
onload=resize_iframe;
window.onresize=resize_iframe;

//script2

 if (!document.all) {
    window.onbeforeunload = function() {
      Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);
    }
  }

  function endRequest(sender, e) {
    err = e.get_error();
    if (err){
      if (err.name == "Sys.WebForms.PageRequestManagerServerErrorException") {
        e.set_errorHandled(true);
      }
    }
  }
  
 //script3
 
 function pop(pth)
{
window.open(pth,"_blank","height=150,width=200,scrollbars=yes,copyhistory=false,top=500,left=500,statusbar=no,toolbar=no,menubar=no,location=no")
} 
  
  
//script4

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
	
//script5

    try 
    {
        var pageTracker = _gat._getTracker("UA-8981960-1");
        pageTracker._trackPageview();
    }
    catch(err) {}
	
//script6	
	function PDF()
{
alert("No Attachments...");
}

//script

function checkTextAreaMaxLength(textBox,e, length)
{
    
        var mLen = textBox["MaxLength"];
        if(null==mLen)
            mLen=length;
        
        var maxLength = parseInt(mLen);
        if(!checkSpecialKeys(e))
        {
         if(textBox.value.length > maxLength-1)
         {
            if(window.event)//IE
              e.returnValue = false;
            else//Firefox
                e.preventDefault();
         }
    }   
}
function checkSpecialKeys(e)
{
    if(e.keyCode !=8 && e.keyCode!=46 && e.keyCode!=37 && e.keyCode!=38 && e.keyCode!=39 && e.keyCode!=40)
        return false;
    else
        return true;
}      
