function employerSignup(userType)
{

	if ( userType== 'e' ) 
	{
			
		
		
		 document.getElementById('employerFields').style.display= 'inline';	
		  
		 
	}else{
		
		 document.getElementById('employerFields').style.display= 'none';
		
	}
		
	
}
function validateFromCareer()
	{
		if ( document.getElementById('selNumRecruiter').value == '' )
			{
					alert ("please select number of recruiters you want to contacted by.")
					return false;
			}
			
			cat1 = document.getElementById('SelCat1').value;
			cat2 = document.getElementById('SelCat2').value;
			cat3 = document.getElementById('SelCat3').value;
			if ( ( cat1  == '') && ( cat2  == '') && ( cat3  == ''))
			{
				alert ("please select  career industries");
				return false;
			}
			
			if ( (( cat1  == cat2) && (cat2 != '' ) )  ||  ( ( cat2  == cat3) && (cat2 != '' ) )  ||	 (( cat3  == cat1) && (cat1 != '' ) ) )
			{
				alert ("please select  different career industries");
				return false;
			}
		

	}
function clearUp2(obj){
	
	thisObj = document.getElementById(obj);
	var tmpval  = thisObj.value;
	
	tmpval.replace(/^\s+|\s+$/, '');				
	if (tmpval == '')
	{
		thisObj.style.display = 'none';		
		document.getElementById('ppasstxt').style.display='block';			
	}
	
}

function verifyUP()
{	
	thisObj = document.getElementById('ppass');
	var tmpval = thisObj.value;
	tmpval.replace(/^\s+|\s+$/, '');				
	if (tmpval == '')
	{
		thisObj2 = document.getElementById('loginPass');	
		thisObj2.innerHTML ='<input type="text" name="ppass" id="ppass" class="t" style="font-size:11px;width:110px;vertical-align:middle;"  value="password"  onfocus="clearUP()" />';
	}	
}

function clearUP()
{
	thisObj = document.getElementById('ppass');				
	thisObj2 = document.getElementById('loginPass');	
	var tmpstr ='<input type="password" name="ppass" id="ppass" class="t" style="font-size:14px;width:110px;vertical-align:middle;"    />';
	if (thisObj.value == 'password') 
	{
		thisObj2.innerHTML = tmpstr;
	}
	

	
	thisObj = document.getElementById('ppass');
	thisObj.focus();
}


function verifyUN()
{

	thisObj = document.getElementById('tuser');
	var tmpval = thisObj.value;
	tmpval.replace(/^\s+|\s+$/, '');
	
	if ( tmpval == '')
	{		
		thisObj.value = 'email address';
	}
	
} 

function clearUN()
{
	
	thisObj = document.getElementById('tuser');
	if (thisObj.value == 'email address') 
	{
		thisObj.value = '';
	}
	thisObj.focus();

}

var strArr = new Array();		

strArr[0] = "";
strArr[1] = "your first name";
strArr[2] = "your last name";
strArr[3] = "your email address";
strArr[4] = "confirm email address";
strArr[5] = "Phone number with area code";

var objArr = new Array();
objArr[0] = "";			
objArr[1] = "tfname";			
objArr[2] = "tlname";			
objArr[3] = "temail";			
objArr[4] = "temailc";			
objArr[5] = "phone_number";
		
	function textboxmsg(obj , n)
	{
		thisObj = document.getElementById(obj);
		var tmpval = thisObj.value;
		tmpval.replace(/^\s+|\s+$/, '');
		
		if ( tmpval == '')
		{		
			thisObj.value = strArr[n];
		}
	
	}
	
	function emptytextbox(obj, n)
	{	
		thisObj = document.getElementById(obj);
		if (thisObj.value == strArr[n]) 
		{
			thisObj.value = '';
		}
		thisObj.focus();
	}
	
	
	function frmsubmit(){
		
		var x;
		for (x in strArr)
		{
			thisObj = document.getElementById(objArr[x]);
			alert( thisObj.name);
			if ( thisobj.value == strArr[x] ) 
			{
				thisObj.value ='';	
			}
			
		}
		
		return true;
		
	}		
	
function ONW(url,winwidth,winheight) 
{

NewWindow=window.open(url,'descr','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,scrollbars=no,resizable=no,copyhistory=no,width='+winwidth+',height='+winheight)
}
function ONW2(url,winwidth,winheight) 
{

NewWindow=window.open(url,'descr','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,scrollbars=yes,resizable=no,copyhistory=no,width='+winwidth+',height='+winheight)
}




function search_recr(url)
{
	request = createXMLHttp();
	request.onreadystatechange = tsearch_recr;
	request.open("GET", '../'+url, true);
	if (window.XMLHttpRequest)
	{
		request.send(null);
	}
	if (window.ActiveXObject)
	{
		request.send();
	}
}
function tsearch_recr()
{
	if (request.readyState == 4)
	{
		if (request.status == 200)
		{
			if (request.responseText)
			{
				m_sa(request.responseText);
			}
		}
	}
}
function p_search_recr()
{
	search_recr('createjobsearch.php?mod=a');
}

function gr_sa(url)
{
	request = createXMLHttp();
	request.onreadystatechange = tr_sa;
	request.open("GET", url, true);
	if (window.XMLHttpRequest)
	{
		request.send(null);
	}
	if (window.ActiveXObject)
	{
		request.send();
	}
}
function tr_sa()
{
	if (request.readyState == 4)
	{
		if (request.status == 200)
		{
			if (request.responseText)
			{
				m_sa(request.responseText);
			}
		}
	}
}

function showproduct(){
	
	
	 document.getElementById('productTable').style.display= 'inline';
	 document.getElementById('serviceTable').style.display= 'none';
	 
}
function showservice(){
	 document.getElementById('serviceTable').style.display= 'inline';
	 document.getElementById('productTable').style.display= 'none';
	 
}


function p_sa_s()
{
	
	
//	gr_sa('aj_searcharea.php?mod=s');

	document.getElementById('advanceSearch').style.display = 'none';	
	document.getElementById('simpleSearch').style.display = 'block';

/*	if ( document.getElementById('ajsearch_s').innerHTML != '' ) { htm1 =document.getElementById('ajsearch_s').innerHTML;document.getElementById('ajsearch_s').innerHTML=''; }
	if ( document.getElementById('ajsearch_a').innerHTML != '' ) { htm2 =document.getElementById('ajsearch_a').innerHTML;document.getElementById('ajsearch_a').innerHTML=''; }



	//document.getElementById('searcharea').innerHTML = htm1 ;
	document.getElementById('top_a_1').style.display = 'none';
	document.getElementById('top_a_2').style.display = 'none';	
	document.getElementById('top_s_1').style.display = 'block';
	document.getElementById('top_s_2').style.display = 'block';*/

	

}
function p_sa_a()
{

/*	document.getElementById('top_a_1').style.display = 'block';
	document.getElementById('top_a_2').style.display = 'block';
	
	document.getElementById('top_s_1').style.display = 'none';
	document.getElementById('top_s_2').style.display = 'none';
*/	
	document.getElementById('simpleSearch').style.display = 'none';	
	document.getElementById('advanceSearch').style.display = 'block';
//	gr_sa('aj_searcharea.php?mod=a');

	
}

//Schimbarea in categoriile de jos wazza/sponsors

function gr_sac(url)
{
	request = createXMLHttp();
	request.onreadystatechange = tr_sac;
	request.open("GET", url, true);
	if (window.XMLHttpRequest)
	{
		request.send(null);
	}
	if (window.ActiveXObject)
	{
		request.send();
	}
}
function tr_sac()
{
	if (request.readyState == 4)
	{
		if (request.status == 200)
		{
			if (request.responseText)
			{
				m_sac(request.responseText);
			}
		}
	}
}

function m_sac(str)
{
	document.getElementById('abody').innerHTML = str;
}

function bc_sa_w()
{
	gr_sac('abody.php?bottom_category=wazza');
}
function bc_sa_s()
{
	gr_sac('abody.php?bottom_category=sponsors');
}

/*
function p_sa_s_employers()
{
	gr_sa('employers.html?mod=s');
}
function p_sa_a_employers()
{
	gr_sa('employers.html?mod=a');
}
*/
function m_sa(str)
{
	document.getElementById('searcharea').innerHTML = str;
}


function latime()
{
   document.sl.submit();
   return true;
}

function hideflash()
{
   document.prez_flash.submit();
   return true;
}
function showflash()
{
   document.prez_flash.submit();
   return true;
}

function showdiv()
{	
   a=document.getElementById('asdf');
   a.style.display="";
  // return true; 
}

function sponsors()
{	
   a=document.getElementById('wazza');
   b=document.getElementById('sponsors');
   c=document.getElementById('wazza1');
   d=document.getElementById('sponsors1');
   a.style.display="none";
   b.style.display="block";
   c.style.display="none";
   d.style.display="block";
  // return true; 
}

function wazza()
{	
   a=document.getElementById('wazza');
   b=document.getElementById('sponsors');
   c=document.getElementById('wazza1');
   d=document.getElementById('sponsors1');
   a.style.display="block";
   b.style.display="none";
   c.style.display="block";
   d.style.display="none";
  // return true; 
}

function pop(x)
{
	testwindow= window.open (x, "mywindow","scrollbars=yes,width=550px,height=450px");
	testwindow.moveTo(0,0);
}
function popUp(URL,title) {
	//testwindow= window.open (URL, title,"scrollbars=no,width=597px,height=343px");
	//testwindow.moveTo(200,200);

	day = new Date();
	id = day.getTime();
	testwindow = eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=no,width=597,height=343');");
	testwindow.moveTo(200,200);
}

function popUp_privacy(URL,title) {
	//testwindow= window.open (URL, title,"scrollbars=no,width=597px,height=343px");
	//testwindow.moveTo(200,200);

	day = new Date();
	id = day.getTime();
	testwindow = eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=yes');");
	//testwindow.moveTo(200,200);
}

function hideToolTip(e){
  var d = document.getElementById("btc");
  if(d.childNodes.length>0) d.removeChild(d.firstChild);
}

 function  ShowDiv(obj2)
		     {

			  
				 var IE = document.all?true:false
				 e = document.onmousemove ; 
				// If NS -- that is, !IE -- then set up for mouse capture
				if (!IE) document.captureEvents(Event.MOUSEMOVE);
				
			   var tempX;	
			   var tempY;
			   if (IE) 
			   { // grab the x-y pos.s if browser is IE
				tempX = event.clientX + document.body.scrollLeft
				tempY = event.clientY + document.body.scrollTop
			    }
			   //else 
			   //{  // grab the x-y pos.s if browser is NS
			    
			//	tempX = event.clientX; 
			//	tempY = event.clientY; 
			 //  }  
/*			   obj2.style.pixelLeft =obj1.offsetWidth+130;
			   obj2.style.pixelTop  =obj1.offsetHeight+235;		*/
			   obj2.style.pixelLeft =tempX-130;
			   obj2.style.pixelTop  =tempY+10;		
			   obj2.style.visibility = "visible";
			 }
function ShowDiv2(xpos, ypos, div_disp){
	document.getElementById(div_disp).style.left = parseInt(xpos)-130+document.body.scrollLeft;
	document.getElementById(div_disp).style.top =parseInt(ypos)+10+document.body.scrollTop;		
	document.getElementById(div_disp).style.visibility = "visible";
	
	}
function checklogin(){
alert("An incorrect username and password combination was entered.");
}

function checkRes(){
var thiswidth=screen.width;
var thisheight=screen.height;



var if640x480= 307;

var if800x600= 307;

var if1024x768=307;

var if1152x864=333;

var if1280x720=430;

var width1 = 640; var height1 = 480;
var width2 = 800; var height2 = 600;
var width3 = 1024; var height3 = 768;
var width4 = 1152; var height4 = 864;
var width5 = 1280; var height5 = 720;

if (screen.width == width1 ){
 tmp=if640x480;}
else if(screen.width == width2){
  tmp=if800x600;}
else if(screen.width == width3 ){
  tmp=if1024x768;}
else {
	 tmp = parseInt( screen.width/2)-196-15 + 20;

	}
	if  (  document.getElementById("Layer1") != null )
	{
	   document.getElementById("Layer1").style.left=tmp;
	}
	var bname = navigator.appName;
	if (bname == "Microsoft Internet Explorer")
	   {
	     document.getElementById("maintable1").style.width=thiswidth-20;
		  tmp=thiswidth-16;
	   }
	else
	   {
	     document.getElementById("maintable1").style.width=thiswidth-16;
		 tmp=thiswidth-16;
	   }

	makeRequest('screen.php?width='+tmp,'showcat');
	
	}