// JavaScript Document
function CheckItem(sender, args)
{     
 //var chkControlId = '<%=chkerp.ClientID%>';
 var options = document.getElementById("ctl00_ContentPlaceHolder1_chkerp").getElementsByTagName('input');    
 var ischecked=false;   
 args.IsValid =false;    
 for(i=0;i<options.length;i++)   
  {       
  var opt = options[i];       
   if(opt.type=="checkbox")      
     {          
     if(opt.checked)          
       {             
        ischecked= true;             
           args.IsValid = true;                         
        } 
      } 
  }
 }
	
	function popitPdf(url) {
	newwindow=window.open(url,"win",'location=no,width=1064,height=800');

	if (window.focus) {newwindow.focus()}
	return false;
}

function popitup(url) {
	newwindow=window.open(url,'name','height=350,width=350');
	if (window.focus) {newwindow.focus()}

}
function popitup1(url) {
	newwindow=window.open(url,'name','height=600,width=500');
	if (window.focus) {newwindow.focus()}
	return false;
}

function calpopup(url) {
	newwindow=window.open(url,'name','height=450,width=720');
	if (window.focus) {newwindow.focus()}
	return false;
}

function show_txt()
{
if(document.getElementById('ddlquali').options.value=="Others")
{
document.getElementById('txtothers').style.display='block';
document.getElementById('rfvothers').enabled=true;
document.getElementById('rfvothers').style.display='block';

}
else
{
document.getElementById('txtothers').style.display='none';
document.getElementById('rfvothers').enabled=false;
document.getElementById('rfvtothers').style.display='block';
}

}

function show_qualification(ddlid,txtid,rfvid)
{
   if(ddlid.options.value=="0")
  {
   document.getElementById(txtid).style.display='block';
   document.getElementById(rfvid).enabled=true;
   document.getElementById(rfvid).style.display='block';
   }
   else
   {
   document.getElementById(txtid).style.display='none';
   document.getElementById(rfvid).enabled=false;
   document.getElementById(rfvid).style.display='block';
   } 

}

function show_qual1(ddlid)
{
alert("a");

}


function show_erptxt()
{
if(document.getElementById('ddlpr').options.value=="0")
{
document.getElementById('txterp').style.display='none';
document.getElementById('lblerp').style.display='none';
document.getElementById('txterp').value="";

}
else
{
document.getElementById('txterp').style.display='block';
document.getElementById('lblerp').style.display='block';
}

}

function openWin2() {
myWin= open("MAP.html", "displayWindow",
"width=792,height=570,status=no,toolbar=no,menubar=no");
}

function showdiv(divname)
{
var div;
var i;
if(document.getElementById(divname).style.display == "none")
document.getElementById(divname).style.display="block";
else
document.getElementById(divname).style.display='none';

for(i=1;i<=6;i++)
{
div="div" +i;

if(div!=divname)
{
if(document.getElementById(divname).style.display == "block")
document.getElementById(div).style.display='none';
}
}
}