
	function calculateCoordinates(x,y,layer){
		x.value = document.getElementById(layer).offsetLeft;
		y.value = document.getElementById(layer).offsetTop;
	}
	
	function openWindow(pURL) {
		myWindow = window.open(pURL, "myLittleCalendar", 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=170,height=270');
	}
	
	function openWindow1(pURL) {
		window.open(pURL,'', 'scrollbars=yes,resizable=yes,width=760,height=520');
	}
	
	function checkHiddenValue(hid,message1,message2){
		if(hid.value == ""){
			alert(message1);		
			return(false);
		}
		if(document.sbs.SearchResult1_chkFolder.checked || document.sbs.SearchResult1_chkMail.checked){
			return true;	
		}
		alert(message2);
		return(false);
	}

	function newBrowserWithInfo(url,info){
		window.open(url,"",info);
		return(true);
	}	
	
	function alertMe(message){
		if(confirm(message)){
			window.open('default.aspx','_self');
		}
	}	
	
	var plusImg = new Image();
		plusImg.src = "../imagesv/plus.gif"
	var minusImg = new Image();
		minusImg.src = "../images/minus.gif"

	function hideLevel( _levelId, _imgId ) {
		var thisLevel = document.getElementById( _levelId );
		var thisImg = document.getElementById( _imgId );
		thisLevel.style.display = "none";
		thisImg.src = plusImg.src;
	}
	
	function hideLevel( _levelId) {
		var thisLevel = document.getElementById( _levelId );		
		thisLevel.style.display = "none";
	}

	function hideSections() {	
		hideLevel("TbPersonalInformation", "ImgPersonalInformation");							
		hideLevel("TrPersonalInformation");
		hideLevel("TbWorkExperience", "ImgWorkExperience");							
		hideLevel("TrWorkExperience");
		hideLevel("TbEducationHistory", "ImgEducationHistory");							
		hideLevel("TrEducationHistory");
		hideLevel("TbComputerSkill", "ImgComputerSkill");							
		hideLevel("TrComputerSkill");
		hideLevel("TbLanguageSkill", "ImgLanguageSkill");							
		hideLevel("TrLanguageSkill");
		hideLevel("TbCertificate", "ImgCertificate");							
		hideLevel("TrCertificate");
		hideLevel("bottom");
	}
	
	function hideSectionsSearch() {	
		hideLevel("TbPersonalInformation", "ImgPersonalInformation");
		hideLevel("TbContactInformation", "ImgContactInformation");
		hideLevel("TbWorkExperience", "ImgWorkExperience");	
		hideLevel("TbEducationHistory", "ImgEducationHistory");	
		hideLevel("TbComputerSkill", "ImgComputerSkill");	
		hideLevel("TbLanguageSkill", "ImgLanguageSkill");	
		hideLevel("TbCertificate", "ImgCertificate");	
	}
	
	function showLevel( _levelId, _imgId ) {
		var thisLevel = document.getElementById( _levelId );
		var thisImg = document.getElementById( _imgId );
		if ( thisLevel.style.display == "none") {
			thisLevel.style.display = "block";
			thisImg.src = minusImg.src;
		}
		else {
			hideLevel( _levelId, _imgId);
		}		
	}
	
	function showLevel( _levelId) {
		var thisLevel = document.getElementById( _levelId );			
		if ( thisLevel.style.display == "none") {
			thisLevel.style.display = "block";				
		}
		else {
			hideLevel( _levelId);
		}
	}
	
	function showmessage(lin) {
		ss = lin.value.split("|") ;
		document.getElementById("TrackYourStatus1_trackyourstatusread_readmessage").innerHTML = ss[2];
	}
	
	function showapplicant(lin) {
		ss = lin.value.split("|") ;
		document.sbs.SearchResult1_hidPersonID.value = ss[0];			
		document.getElementById("SearchResult1_namesurname").innerHTML = ss[1] + " " + ss[2] + " (<a class=fields href=" + ss[16] + ">" + ss[16] + "</a>)";
		document.getElementById("SearchResult1_homephone").innerHTML = "<b>H:</b> (" + ss[3] + ") " + ss[4] + " " + ss[5];
		document.getElementById("SearchResult1_workphone").innerHTML = "<b>W:</b> (" + ss[8] + ") " + ss[7] + " " + ss[6] + "-" + ss[9];
		document.getElementById("SearchResult1_mobilephone").innerHTML = "<b>M:</b> (" + ss[10] + ") " + ss[11] + " " + ss[12];
		document.getElementById("SearchResult1_fax").innerHTML = "<b>F:</b> (" + ss[13] + ") " + ss[14] + " " + ss[15];	
		if(ss[17] != ""){
			document.getElementById("SearchResult1_divcertificates").innerHTML = "Career Objective";			
			document.getElementById("SearchResult1_certificates").innerHTML = ss[17];
		}	
		if(ss[18] != ""){
			document.getElementById("SearchResult1_divawards").innerHTML = "Awards and Publications";			
			document.getElementById("SearchResult1_awards").innerHTML = ss[18];	
		}		
		if(ss[19] != ""){
			document.getElementById("SearchResult1_divhobbies").innerHTML = "Hobbies";			
			document.getElementById("SearchResult1_hobbies").innerHTML = ss[19];	
		}	
		if(ss[21] != ""){
			document.getElementById("SearchResult1_divmembership").innerHTML = "Memberships";			
			document.getElementById("SearchResult1_membership").innerHTML = ss[21];	
		}
		document.getElementById("SearchResult1_address").innerHTML = ss[23];	
		document.getElementById("SearchResult1_district").innerHTML = ss[25];
		document.getElementById("SearchResult1_city").innerHTML = ss[26];
		document.getElementById("SearchResult1_postalcodecountry").innerHTML = ss[24] + " " + ss[27];	
	}
	
	function totrash(lin)  {
		for(var i=0; i<lin.options.length; i++)  {
			if(lin.options[i].selected && lin.options[i].value != "")  {
				lin.options[i]=null;
						i--;
			}
		}
	}
	
	function toshortlist(lin,lout) {
		for(var i=0; i<lin.options.length; i++) {
			if(lin.options[i].selected && lin.options[i].value != "") {
				var no = new Option();
				no.value = lin.options[i].value;
				no.text = lin.options[i].text;
				no.selected= true;
				lout.options[lout.options.length] = no;
				lin.options[i]=null;
				i--
		   }
		}
	}
	
	function navigatetoapplicant(lin){
		var ss;
		for(var i=0; i<lin.options.length; i++) {
			if(lin.options[i].selected && lin.options[i].value != "") {
				ss = lin.options[i].value.split("|") ;
				window.open("ViewPersonalProfile.aspx?id=" + ss[0],"","width=800,height=700,resizable=yes,scrollbars=yes")	
			}				
		}
		return false;
	}	
	
	function navigatetoresume(lin){
		var ss;
		for(var i=0; i<lin.options.length; i++) {
			if(lin.options[i].selected && lin.options[i].value != "") {
				ss = lin.options[i].value.split("|") ;
				window.open("ViewResume.aspx?id=" + ss[0],"","width=800,height=700,resizable=yes,scrollbars=yes")	
			}				
		}
		return false;
	}	
	
