document.write("<script type='text/javascript' src='../scripts/validation.js'></"+"script>");

function selectedCheckbox(element)
{
	var count=document.getElementById("count").value;
	var ctlForm = element.form;
	var ctlTR = null;
	var flag=0;
	var jobIds="";
	for (var i = 0; i < ctlForm.elements.length; i++)
	{
	  var ctl = ctlForm.elements[i];
	  if (ctl.id.indexOf("check") == 0 )
	  {
	  	if(ctl.checked==true)
		{
			flag=1;
			jobIds=jobIds+ctl.value+"|";
		}
	  }
	}
	if(flag==0)
	{
		alert("Please select job")
		return false;
	}else{
	var url = "applyForJob.jsp?jobIds="+jobIds;
	var width=900;
	var height=600;
	var winl = (screen.width - width) / 2;
	var wint = (screen.height - height) / 2;
	winprops = 'height='+height+',width='+width+',top='+wint+',left='+winl+',resizable=1,menubar=0,toolbar=0,status=0,scrollbars=1'
	newwindow=window.open(url,'Application',winprops);
	if (window.focus) {newwindow.focus()}
		return false;
	}
}

function viewJobWindowForJs(mytitle,jid,empid)
{
	var url="viewJobForJs.jsp?title="+mytitle+"&jid="+jid+"&empid="+empid
	var width=900;
	var height=600;
	var winl = (screen.width - width) / 2;
	var wint = (screen.height - height) / 2;
	winprops = 'height='+height+',width='+width+',top='+wint+',left='+winl+',resizable=1,menubar=0,toolbar=0,status=0,scrollbars=1'
	newwindow=window.open(url,'Job',winprops);
	if (window.focus) {newwindow.focus()}
		return false;
		
	
}
function showNewsDetails(count)
{
	if(document.getElementById('newsId'+count).style.display == 'none')
	document.getElementById('newsId'+count).style.display = 'block';
else
	document.getElementById('newsId'+count).style.display = 'none';
	
}