var acikMenu=0
var timerID =0
	var IE = document.all?true:false
	if (!IE) document.captureEvents(Event.MOUSEMOVE)
	document.onmousemove = getMouseXY;
	var tempX = 0
	var tempY = 0
	
	function getMouseXY(e) {
		if (IE) {
	    	tempX = event.clientX + document.body.scrollLeft
    		tempY = event.clientY + document.body.scrollTop
  		} 
		else {
		    tempX = e.pageX
		    tempY = e.pageY
		}  
	  if (tempX < 0){tempX = 0}
	  if (tempY < 0){tempY = 0}  
	}

	//maxCloseTime =20
	//maxOpenTime =20
	showTimer = 1000
	closeTimer=1000
	posLayer='p1'
	w=100
	h=100
	html='Bolgeler'
	addx=1
	addy=1
	lastLayer=''
	prestijhtml='<table width=96% cellpadding=4 cellspacing=0 align=center><tr><td class="Header2"><b>#pozisyonadi#</b><br><font class=Header3>#firmaadi#</font></td><td align=right valign=top><a href=\'javascript:hideDiv(1);\'><img src=\'/newimg/sk#chkskinno#/sil.jpg\' width=12 height=12 alt=\'\' border=0></a></td></tr><tr><td class=prestij colspan=2><div style="width:100%; overflow:auto; overflow-y: auto; height:135px;">#genelnitelikler#</div></td></tr><tr><td  colspan=2><br><a href="javascript:gokariyer(\'/executive/jobsearch/jobdetail.kariyer\',\'&ilankodu=#ilankodu#\',0)" class=link><b>&raquo; İlana Başvur</b></a>#tumilanlar#</td></tr></table>'
	var IE = document.all?true:false
		
	function setDiv(ax,bx,cx,dx,fx,gx,hx,ix)
	{
		//alert(document.getElementById(ax).offsetTop)
		//if (dx==6) return;
		if (lastLayer == ax) return
		lastLayer = ax;
		posLayer = ax;
		w = bx
		h = cx
		html = dx
		addx=fx
		addy=gx
		showTimer = hx*50
		closeTimer = ix*50
		hideDiv(0)
		setTimeout("showDiv()",showTimer)
	}
	
	function showDiv()
	{	
				
		vposDiv= document.getElementById(posLayer)
		vmainDiv= document.getElementById("mainDiv")
		/*xxx= document.getElementById("xxxx")
		xxx.innerHTML =tempX
		yyy= document.getElementById("yyyy")
		yyy.innerHTML =vposDiv.offsetLeft
		*/

		if (!(tempX > vposDiv.offsetLeft && tempX < vposDiv.offsetLeft+vposDiv.offsetWidth	&& tempY > vposDiv.offsetTop-25 && tempY  < vposDiv.offsetTop+vposDiv.offsetHeight) ) return
		//alert(addx)
		vmainDiv.style.top=vposDiv.offsetTop+addy
		vmainDiv.style.left=vposDiv.offsetLeft+addx
		//alert (vposDiv.offsetLeft+addx)
		vmainDiv.style.width=w
		vmainDiv.style.height=h

		if (posLayer.indexOf('prestij') >= 0 )
			{
				sonuc = prestijhtml
				sonuc = sonuc.replace(/#genelnitelikler#/g,ilanlar[html][5])
				sonuc = sonuc.replace(/#pozisyonadi#/g,ilanlar[html][4])
				sonuc = sonuc.replace(/#firmaadi#/g,ilanlar[html][3])
				sonuc = sonuc.replace(/#ilankodu#/g,ilanlar[html][0])
				if (ilanlar[html][1] =='')
					sonuc = sonuc.replace(/#tumilanlar#/g,'')
					else
					sonuc = sonuc.replace(/#tumilanlar#/g,'<br><a href="javascript:gokariyer(\'/executive/jobsearch/firmaprofil.kariyer\',\'&firma=#firmakodu#\',0)" class=link><b>&raquo; Firmanın Tüm İlanları</b></a>')
				sonuc = sonuc.replace(/#firmakodu#/g,ilanlar[html][1])					
			}
		else
			{
				sonuc=html
			}
		sonuc = sonuc.replace(/#chkskinno#/g,chk_skinno)
		vhtml='<div id="shd001" style="position:absolute;margin:3px;z-index: 1000; height: '+h+'; width: '+w+'; filter: alpha(opacity=40); opacity: 0.4;">'
		vhtml= vhtml + '					<table width="'+w+'" cellpadding="0" cellspacing="0" border="0">'
		vhtml= vhtml + '						<tr>'
		vhtml= vhtml + '							<td><img src="/img/sk1/ust/shadow1.gif" width="11" height="11" alt=""></td>'
		vhtml= vhtml + '							<td bgcolor="black" width="100%"></td>'
		vhtml= vhtml + '							<td><img src="/img/sk1/ust/shadow2.gif" width="11" height="11" alt=""></td>'
		vhtml= vhtml + '						</tr>'
		vhtml= vhtml + '						<tr>'
		vhtml= vhtml + '							<td colspan="3" bgcolor="black" height="'+(h-22)+'"></td>'
		vhtml= vhtml + '						</tr>'
		vhtml= vhtml + '						<tr>'
		vhtml= vhtml + '							<td><img src="/img/sk1/ust/shadow3.gif" width="11" height="11" alt=""></td>'
		vhtml= vhtml + '							<td bgcolor="black"></td>'
		vhtml= vhtml + '							<td><img src="/img/sk1/ust/shadow4.gif" width="11" height="11" alt=""></td>'
		vhtml= vhtml + '						</tr>'
		vhtml= vhtml + '					</table>'
		vhtml= vhtml + '				</div>'
		
		vhtml= vhtml + '				<div id="shd002" style="position:relative; z-index: 1002;">'
		vhtml= vhtml + '				<table width="'+w+'" cellpadding="0" cellspacing="0" border="0">'
		vhtml= vhtml + '					<tr>'
		vhtml= vhtml + '						<td width="11" background="/img/sk1/ust/divsolust.gif"></td>'
		vhtml= vhtml + '						<td width="100%" background="/img/sk1/ust/divust.gif"></td>'
		vhtml= vhtml + '						<td width="11"><img src="/img/sk1/ust/divsagust.gif" width="11" height="11" alt=""></td>'
		vhtml= vhtml + '					</tr>'
		vhtml= vhtml + '					<tr>'
		vhtml= vhtml + '						<td background="/img/sk1/ust/divsol.gif"></td>'
		vhtml= vhtml + '						<td bgcolor="#ffffff" height="'+(h-22)+'" valign="top">'
		vhtml= vhtml + sonuc 
		vhtml= vhtml + '						</td>'
		vhtml= vhtml + '						<td background="/img/sk1/ust/divsag.gif"></td>'
		vhtml= vhtml + '					</tr>'
		vhtml= vhtml + '					<tr>'
		vhtml= vhtml + '						<td><img src="/img/sk1/ust/divsolalt.gif" width="11" height="11" alt=""></td>'
		vhtml= vhtml + '						<td><img src="/img/sk1/ust/divalt.gif" width="100%" height="11" alt=""></td>'
		vhtml= vhtml + '						<td><img src="/img/sk1/ust/divsagalt.gif" width="11" height="11" alt=""></td>'
		vhtml= vhtml + '					</tr>'
		vhtml= vhtml + '				</table>'
		vhtml= vhtml + '				</div>'
		
		vmainDiv.innerHTML =vhtml.replace('a','A')
		
		vmainDiv.style.display=''
		setTimeout("hideDiv(0)",closeTimer) 

		//alert (vmainDiv.offsetTop)
		
	}
	function hideDiv(clink)
	{	
	
		//return
		vmainDiv= document.getElementById("mainDiv")
		vposDiv= document.getElementById(posLayer)
		if (clink==0 && ((tempX > vmainDiv.offsetLeft && tempX < vmainDiv.offsetLeft+vmainDiv.offsetWidth	&& tempY > vmainDiv.offsetTop && tempY  < vmainDiv.offsetTop+vmainDiv.offsetHeight) 
		   || (tempX > vposDiv.offsetLeft && tempX < vposDiv.offsetLeft+vposDiv.offsetWidth	&& tempY > vposDiv.offsetTop -25 && tempY  < vposDiv.offsetTop+vposDiv.offsetHeight) ))
			{
			setTimeout("hideDiv(0)",closeTimer) 
			}
		else
			{
				vmainDiv.style.display='none'
				lastLayer =''
			}
	}
	
	
	function writePrestij(basla,chklink,sayfadakiSayi)
	{
		son = basla+sayfadakiSayi-1
		for (xx=basla;xx<=son;xx=xx+2)
		{
			ind = xx
			
				document.write ('<tr>');
					document.write ('<td valign="top" onmouseover="setDiv(\'prestij'+ind+'\',430,280,'+ind+',-40,26,30,10)">')
					if (ilanlar[ind][2] != '') 
						{
						document.write ('<a href="/executive/jobsearch/firmaprofil.kariyer'+chklink+'&firma='+ilanlar[ind][1]+'" class="prestijBig">')
						document.write ('<img src="'+imageserver+'/profiles/logodb/Slogodb2/'+ilanlar[ind][2]+'" border=0 alt=""  hspace=0></a>')
						}
					document.write ('</td>');

			document.write ('<td width="50%"  valign="top" onmouseover="setDiv(\'prestij'+ind+'\',430,280,'+ind+',-40,26,30,10)"><span id="prestij'+ind+'" style="position:relative">')
			if (ilanlar[ind][1] != '') 
				document.write ('<a href="/executive/jobsearch/firmaprofil.kariyer'+chklink+'&firma='+ilanlar[ind][1]+'" class="prestijBig">')
			else
				document.write ('<a href="/executive/jobsearch/jobdetail.kariyer'+chklink+'+&ilankodu='+ilanlar[ind][0]+'" class="prestijBig">')
			document.write ('<b>')
			document.write (ilanlar[ind][3])
			document.write ('</b><br><font class="prestij">')
			document.write (ilanlar[ind][4])
			document.write ('</font></a>')
			document.write ('</span></td>')

			ind = ind + 1
					document.write ('<td  valign="top" onmouseover="setDiv(\'prestij'+(ind)+'\',430,280,'+(ind+1)+',-40,26,30,10)">')
					if (ilanlar[ind][2] != '') 
						{
						document.write ('<a href="/executive/jobsearch/firmaprofil.kariyer'+chklink+'&firma='+ilanlar[ind][1]+'" class="prestijBig">')
						document.write ('<img src="'+imageserver+'/profiles/logodb/Slogodb2/'+ilanlar[ind][2]+'" border=0 alt=""  hspace=0></a>')
						}
					document.write ('</td>');

			document.write ('<td width="50%" valign="top" onmouseover="setDiv(\'prestij'+ind+'\',430,280,'+ind+',-40,26,30,10)"><span id="prestij'+ind+'" style="position:relative">')
			if (ilanlar[ind][1] != '') 
				document.write ('<a href="/executive/jobsearch/firmaprofil.kariyer'+chklink+'&firma='+ilanlar[ind][1]+'" class="prestijBig">')
			else
				document.write ('<a href="/executive/jobsearch/jobdetail.kariyer'+chklink+'+&ilankodu='+ilanlar[ind][0]+'" class="prestijBig">')
			document.write ('<b>')
			document.write (ilanlar[ind][3])
			document.write ('</b><br><font class="prestij">')
			document.write (ilanlar[ind][4])
			document.write ('</font></a>')
			document.write ('</span></td></tr>')
			
			document.write ('<tr><td colspan="2" height="3"></td></tr>');
		}
	}
	
	
	
	function writePrestijSektorel(basla,chklink,sayfadakiSayi)
	{
		writePrestij(basla,chklink,sayfadakiSayi)
		return
		
		
		son = basla+sayfadakiSayi-1
		for (xx=basla;xx<=son;xx=xx+2)
		{
			ind = xx
			
			if (ilanlar[ind][2] != '' || ilanlar[ind+1][2] != '') 
			{
				document.write ('<tr>');
					document.write ('<td valign="bottom" onmouseover="setDiv(\'prestij'+ind+'\',500,300,'+ind+',40,20,30,10)">')
					if (ilanlar[ind][2] != '') 
						{
						document.write ('<a href="/executive/jobsearch/firmaprofil.kariyer'+chklink+'&firma='+ilanlar[ind][1]+'" class="prestijBig">')
						document.write ('<img src="/profiles/logodb/Slogodb/'+ilanlar[ind][2]+'" border=0 alt=""  hspace=0></a>')
						}
					document.write ('</td>');
					document.write ('<td  valign="bottom" onmouseover="setDiv(\'prestij'+(ind+1)+'\',500,300,'+(ind+1)+',40,20,30,10)">')
					if (ilanlar[ind+1][2] != '') 
						{
						document.write ('<a href="/executive/jobsearch/firmaprofil.kariyer'+chklink+'&firma='+ilanlar[ind+1][1]+'" class="prestijBig">')
						document.write ('<img src="/profiles/logodb/Slogodb/'+ilanlar[ind+1][2]+'" border=0 alt=""  hspace=0></a>')
						}
					document.write ('</td>');
				document.write ('</tr>');
			}
			
			document.write ('<tr>');
			document.write ('<td width="50%"  valign="top" onmouseover="setDiv(\'prestij'+ind+'\',500,300,'+ind+',40,20,30,10)"><span id="prestij'+ind+'" style="position:relative"></span>')
			if (ilanlar[ind][1] != '') 
				document.write ('<a href="/executive/jobsearch/firmaprofil.kariyer'+chklink+'&firma='+ilanlar[ind][1]+'" class="prestijBig">')
			else
				document.write ('<a href="/executive/jobsearch/jobdetail.kariyer'+chklink+'+&ilankodu='+ilanlar[ind][0]+'" class="prestijBig">')
			document.write ('<b>')
			document.write (ilanlar[ind][3])
			document.write ('</b><br><font class="prestij">')
			document.write (ilanlar[ind][4])
			document.write ('</font></a>')
			document.write ('</td>')

			ind = ind + 1

			document.write ('<td width="50%" valign="top" onmouseover="setDiv(\'prestij'+ind+'\',500,300,'+ind+',40,20,30,10)"><span id="prestij'+ind+'" style="position:relative"></span>')
			if (ilanlar[ind][1] != '') 
				document.write ('<a href="/executive/jobsearch/firmaprofil.kariyer'+chklink+'&firma='+ilanlar[ind][1]+'" class="prestijBig">')
			else
				document.write ('<a href="/executive/jobsearch/jobdetail.kariyer'+chklink+'+&ilankodu='+ilanlar[ind][0]+'" class="prestijBig">')
			document.write ('<b>')
			document.write (ilanlar[ind][3])
			document.write ('</b><br><font class="prestij">')
			document.write (ilanlar[ind][4])
			document.write ('</font></a>')
			document.write ('</td></tr>')
			
			document.write ('<tr><td colspan="2" height="3"></td></tr>');
		}
	}
