//added 05/05/2006 taltal
//draw activeX controlls for microsoft security update
//regurding IE ActiveX handeling
function drawControlObj(w,h,objectId,embedId, filePath, wMode, display, position)
{
	try
	{
		if(wMode==undefined)
			wMode = '' 
		if(display==undefined)
			display = ''	
		if(position==undefined)	
			position = 'relative'
		document.write("<OBJECT style='position:"+position+";display:"+display+"' CLASSID='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' ID='"+objectId+"' WIDTH='"+w+"' HEIGHT='"+h+"'>\n");
		document.write("<PARAM NAME='movie' VALUE='"+filePath+"'>");
		document.write("<PARAM NAME=play VALUE=true>");
		document.write("<PARAM NAME=loop VALUE=true>");
		document.write("<PARAM NAME=menu VALUE=false>");
		document.write("<PARAM NAME=allowScriptAccess VALUE=always>");
		if (wMode=='transparent')
			document.write("<PARAM NAME=wmode VALUE=transparent>");
		document.write("<PARAM NAME=quality VALUE=high>");
		if (wMode=='transparent')
			document.write("<EMBED wMode='transparent' SRC='"+filePath+"' id='"+embedId+"' type=application/x-shockwave-flash  SWLiveConnect=TRUE play=true loop=false menu=false  WIDTH='"+w+"' HEIGHT='"+h+"' quality=best bgcolor=#ffffff loop=true pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></EMBED></OBJECT>")
		else
			document.write("<EMBED SRC='"+filePath+"' id='"+embedId+"' type=application/x-shockwave-flash  SWLiveConnect=TRUE play=true loop=false menu=false  WIDTH='"+w+"' HEIGHT='"+h+"' quality=best bgcolor=#ffffff loop=true pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></EMBED></OBJECT>")
			
	}
	catch(ex)
	{
	}
}

function drawControll(objectToDrawInID,objectCLSID,objectID,objectTitle,w,h,objectUrl,objectBGColor,embedId)
{
	var localObj;
	try
	{
		if (embedId!= undefined)
			var embedIdStr = embedId
		else
			var embedIdStr = objectID
		var localObj = eval("document.getElementById('" + objectToDrawInID + "')");
		localObj.innerHTML = "" + 
		"<OBJECT classid='" + objectCLSID + "' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' WIDTH='" + w + "' HEIGHT='" + h + "' title='" + objectTitle + "' id='" + objectID + "'>" +
			"<PARAM NAME=movie VALUE='" + objectUrl + "'>" +
			"<PARAM NAME=quality VALUE=high>" +
			"<PARAM NAME=wmode VALUE=transparent>" +
			"<PARAM NAME=bgcolor VALUE='" + objectBGColor + "'>" +
			"<EMBED id='"+ embedIdStr +"' wmode='transparent' src='" + objectUrl + "' quality='high' bgcolor='" + objectBGColor + "'  WIDTH='" + w + "' HEIGHT='" + h + "' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></EMBED>" +
		"</OBJECT>"
	}
	catch(ex)
	{
	}
}

function ChangeBar1(flag)
	{
	if(flag == 1)
		{
		STR = "<table align='right' cellpadding='0' cellspacing='0' border='0' dir='rtl' style='color:#FE860C;font-size:13px;'>" +
				"<tr><td height='8'></td></tr>" +
				"<tr>" +
					"<td align='right'>" +
						"<a href='http://www.tapuz.co.il/tapuznews/' style='color:black;font-size:13px;text-decoration:none;'><strong>חדשות</strong></a>&nbsp;|&nbsp;" +
					"</td>" +
					"<td align='right'>" +
						"<a href='http://www.tapuz.co.il/tapuzsport' style='color:black;font-size:13px;text-decoration:none;'><strong>ספורט</strong></a>&nbsp;|&nbsp;" +
					"</td>" +
					"<td align='right'>" +
						"<a href='http://www.tapuz.co.il/softwares/' style='color:black;font-size:13px;text-decoration:none;'><strong>תוכנות</strong></a>&nbsp;|&nbsp;" +
					"</td>" +
					"<td align='right'>" +
						"<a href='http://www.tapuz.co.il/food/' style='color:black;font-size:13px;text-decoration:none;'><strong>אוכל</strong></a>&nbsp;|&nbsp;" +
					"</td>" +
					"<td align='right'>" +
						"<a href='http://www.tapuz.co.il/birth/' style='color:black;font-size:13px;text-decoration:none;'><strong>הריון ולידה</strong></a>&nbsp;|&nbsp;" +
					"</td>" +
					"<td align='right'>" +
						"<a href='http://www.tapuz.co.il/trip/' style='color:black;font-size:13px;text-decoration:none;'><strong>צימרים</strong></a>&nbsp;|&nbsp;" +
					"</td>" +
					"<td align='right'>" +
						"<a href='http://www.mlog.co.il/' style='color:black;font-size:12px;text-decoration:none;'><strong>MLog</strong></a>&nbsp;|&nbsp;" +
					"</td>" +
					"<td align='right'>" +
						"<a href='http://www.ibooks.co.il/' style='color:black;font-size:12px;text-decoration:none;'><strong>ספרים</strong></a>&nbsp;|&nbsp;" +
					"</td>" +					
					"<td align='right'>" +
						"<a href='http://www.tapuz.co.il/pCards/myCard/login.asp' style='color:black;font-size:13px;text-decoration:none;'><strong>עולמות</strong></a>&nbsp;|&nbsp;" +
					"</td>" +
					"<td align='right'>" +
						"<a href='http://www.tapuz.co.il/albums/' style='color:black;font-size:13px;text-decoration:none;'><strong>אלבומים</strong></a>&nbsp;|&nbsp;" +
					"</td>" +					
					"<td align='right'>" +
						"<a href='http://www.tapuz.co.il/gameon/' style='color:#ce0d46;font-size:12px;text-decoration:none;'><strong>GameOn</strong></a>&nbsp;|&nbsp;" +
					"</td>" +					
					"<td align='right'>" +
						"<font onclick='ChangeBar1(0)' style='cursor:pointer;font-size:14px;'><strong><font style='color:#FE860C;'>>></font></strong></strong></font>" +
					"</td>" +
				"</tr>" +
				"</table>"
		}
	else
		{
		STR = "<table align='right' cellpadding='0' cellspacing='0' border='0' dir='rtl' style='color:#FE860C;font-size:13px;'>" +
				"<tr><td height='8'></td></tr>" +
				"<tr>" +
					"<td align='right'>" +
						"<a href='http://www.tapuz.co.il/forums/apps/spCount.asp?spid=641' style='color:black;font-size:13px;text-decoration:none;'><strong>קניות</strong></a>&nbsp;|&nbsp;" +
					"</td>" +
					"<!--td align='right'>" +
						"<a href='http://www.ib-online.co.il/ExtRefMng_ReferenceIn/1,2578,,00.html?ref_id=10' style='color:black;font-size:13px;text-decoration:none;'><strong>כלכלה</strong></a>&nbsp;|&nbsp;" +
					"</td-->" +
					"<td align='right'>" +
						"<a href='http://www.tapuz.co.il/bike/' style='color:black;font-size:13px;text-decoration:none;'><strong>אופניים</strong></a>&nbsp;|&nbsp;" +
					"</td>" +					
					"<td align='right'>" +
						"<a href='http://www.tapuz.co.il/fun/' style='color:black;font-size:13px;text-decoration:none;'><strong>בידור</strong></a>&nbsp;|&nbsp;" +
					"</td>" +
					"<td align='right'>" +
						"<a href='http://www.tapuz.co.il/forums/apps/spCount.asp?spid=599' style='color:black;font-size:13px;text-decoration:none;'><strong>תיירות</strong></a>&nbsp;|&nbsp;" +
					"</td>" +
					"<td align='right'>" +
						"<a href='http://www.tapuz.co.il/poza/' style='color:black;font-size:13px;text-decoration:none;'><strong>הומור</strong></a>&nbsp;|&nbsp;" +
					"</td>" +
					"<td align='right'>" +
						"<a href='http://www.tapuz.co.il/card/' style='color:black;font-size:13px;text-decoration:none;'><strong>גלויות</strong></a>&nbsp;|&nbsp;" +
					"</td>" +
					"<td align='right'>" +
						"<a href='http://www.tapuz.co.il/forums/apps/spCount.asp?spid=510' style='color:black;font-size:13px;text-decoration:none;'><strong>מפות</strong></a>&nbsp;|&nbsp;" +
					"</td>" +
					"<!--td align='right'>" +
						"<a href='http://www.tapuz.co.il/forums/apps/spCount.asp?spid=133' style='color:black;font-size:13px;text-decoration:none;'><strong>קבוצתיות</strong></a>&nbsp;|&nbsp;" +
					"</td-->" +
					"<!--td align='right'>" +
						"<a href='http://www.tapuz.co.il/stat.asp?f=5&url=http://www.p1000.co.il/p1000/default.asp?came=3001' style='color:black;font-size:13px;text-decoration:none;'><strong>פומביות</strong></a>&nbsp;|&nbsp;" +
					"</td-->" +
					"<td align='right' nowrap>" +
						"<a href='http://tapuz.zap.co.il/' style='color:black;font-size:13px;text-decoration:none;'><strong>השוואת מחירים</strong></a>&nbsp;|&nbsp;" +
					"</td>" +
					"<td align='right'>" +
						"<a href='http://miluim.tapuz.co.il/' style='color:black;font-size:13px;text-decoration:none;'><strong>בלתם</strong></a>&nbsp;|&nbsp;" +
					"</td>" +
					"<td align='right' nowrap>" +
						"<a href='http://www.icity.co.il/' style='color:black;font-size:13px;text-decoration:none;'><strong>iCity</strong></a>&nbsp;|&nbsp;" +
					"</td>" +
					"<td align='right'>" +
						"<font onclick='ChangeBar1(1)' style='cursor:hand;font-size:9px;'><strong><font style='color:#FE860C; font-size: 14px;'><<</font></strong></strong></font>" +
					"</td>" +
					"<td align='right' width='90%'></td>" +
				"</tr>" +
				"</table>"
		}
	document.getElementById("innerTd1").innerHTML = STR;
	}
	
	
function changeHomepageTopNavBar(first)
{
	var imTbl = document.getElementById("imTbl")
	if(first == 1)
	{
		document.getElementById("firstDisplayLinks").style.display = "";
		document.getElementById("secondDisplayLinks").style.display = "none";
		if(imTbl)
			imTbl.style.display = "";
	}
	else
	{
		document.getElementById("secondDisplayLinks").style.display = "";
		document.getElementById("firstDisplayLinks").style.display = "none";
		if(imTbl)
			imTbl.style.display = "none";
	}
}
	
function SetHomePage()
{
	window.document.body.style.behavior='url(#default#homepage)';
	window.document.body.setHomePage('http://www.tapuz.co.il');
}
function Datingvalid()
{
		
	if (document.getElementById("AgeRange").value == 0)
	{
		document.getElementById("fromAge").value = 16
		document.getElementById("toAge").value   = 24
	}
	if (document.getElementById("AgeRange").value == 1)
	{
		document.getElementById("fromAge").value = 25
		document.getElementById("toAge").value   = 35
	}
	if (document.getElementById("AgeRange").value == 2)
	{
		document.getElementById("fromAge").value = 36
		document.getElementById("toAge").value   = 45
	}
	if (document.getElementById("AgeRange").value == 3)
	{
		document.getElementById("fromAge").value = 45
		document.getElementById("toAge").value   = 54
	}
	if (document.getElementById("AgeRange").value == 4)
	{
		document.getElementById("fromAge").value = 55
		document.getElementById("toAge").value   = 120
	}
		
	if (document.getElementById("mySex").value=='' || document.getElementById("sex").value=='' || document.getElementById("fromAge").value=='' || document.getElementById("toAge").value=='')
	{
		alert('יש לבחור את כל שלושת השדות');
		return false; 
	}
	else
	{
		return true;
	}
}

function CapiutValid()
{
		
	if (document.getElementById("AgeRange").value == 0)
	{
		document.getElementById("AgeFrom").value = 16
		document.getElementById("AgeTo").value   = 24
	}
	if (document.getElementById("AgeRange").value == 1)
	{
		document.getElementById("AgeFrom").value = 25
		document.getElementById("AgeTo").value   = 35
	}
	if (document.getElementById("AgeRange").value == 2)
	{
		document.getElementById("AgeFrom").value = 36
		document.getElementById("AgeTo").value   = 45
	}
	if (document.getElementById("AgeRange").value == 3)
	{
		document.getElementById("AgeFrom").value = 45
		document.getElementById("AgeTo").value   = 54
	}
	if (document.getElementById("AgeRange").value == 4)
	{
		document.getElementById("AgeFrom").value = 55
		document.getElementById("AgeTo").value   = 120
	}
		
	if (document.getElementById("mySex").value=='' || document.getElementById("ReqSex").value=='' || document.getElementById("AgeFrom").value=='' || document.getElementById("AgeTo").value=='')
	{
		alert('יש לבחור את כל שלושת השדות');
		return false; 
	}
	else
	{
		return true;
	}
}

mainPageLoaded = false;

function loginUser()
{
	window.open('tapuzforum/main/changeUser.asp','login','width=250,height=160,left=300,top=200,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
}
		
function exitUser()
{
	window.open('tapuzforum/main/exit.asp','exit','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=300,height=130,left=300,top=200');
}

function openBlogTv(chatFolder,ForumUserName)
{	
	w = window.screen.width;

	if(parseInt(w) < 1023)
	{
		window.open('/personalClicks.asp?url=http://www.tapuz.co.il/irc/'+chatFolder+'/main.asp?regUser=yes^room='+ForumUserName ,'chatWin','height=550,width=780');
	}
	else
	{
		window.open('/personalClicks.asp?url=http://www.tapuz.co.il/irc/'+chatFolder+'/main1024.asp?regUser=yes^room='+ForumUserName ,'chatWin','height=625,width=780');
	}
}

function openChatRoom(ChatRoom)
{	
	window.open('personalClicks.asp?url=http://www.tapuz.co.il/irc/router/router.asp@regUser=yes^room='+ChatRoom ,'chatWin','height=540,width=780');
}
function showMorePersonalForums()
{
	document.getElementById('morePersonalForums').style.display = 'block'
	document.getElementById('personalForumsContinue').innerHTML = ""
}
function showMorePersonalCommunas()
{
	document.getElementById('morePersonalCommunas').style.display = 'block'
	document.getElementById('personalCommunasContinue').innerHTML = ""
}
function showMorePersonalBlogs()
{
	document.getElementById('morePersonalBlogs').style.display = 'block'
	document.getElementById('personalBlogsContinue').innerHTML = ""
}

function popChat(PlayerId,Room,Reg)
 {
  var ChatFolder,sWidth
  sWidth = screen.width;


   ChatFolder = "BlogTVU";

  rExp = /#/gi
  Room = Room.replace(rExp," ");


   if(parseInt(sWidth) > 1023)
   {
    winH = 698;
    winW = 797;
    dest = "http://www.tapuz.co.il/irc/" + ChatFolder + "/index1024.asp?regUser=" + Reg + "&PlayerId=" + PlayerId + "&room=" + Room;
   }
   else
   {
    winH = 540;
    winW = 673;
    dest = "http://www.tapuz.co.il/irc/" + ChatFolder + "/index.asp?regUser=" + Reg + "&PlayerId=" + PlayerId + "&room=" + Room;
   }
  window.open(dest,"chatWin","height=" + winH + ",width=" + winW + ",top=10,left=100");
 }
 function GoToFlash(FlashTime)
{
	document.formi.FlashDate.value = FlashTime;
	document.formi.action = "/tapuznews/FlashNews.asp?#" + FlashTime;
	document.formi.submit()
}

function changeHrefStatus(obj)
{
	var strLink = new String();
	strLink = obj.href;
	strLink = strLink.split("link=")[1];
	window.status = strLink;
	
	return strLink;
}

//function SetHomePage()
//{
	
	//document.body.style.behavior='url(#default#homepage)'
	//document.body.setHomePage('http://www.tapuz.co.il')
//}
function closeTB()
{
	document.getElementById("tapuzMainW").style.height = "100%"
	document.getElementById("toolbarIdPos").style.height = "0"
	document.getElementById("toolbar").height = "0"
				
}

function clearStatus()
{
	window.status = ''
}

function submitSearch()
{
	document.jDateSearch.submit()
}
function click1()
{
	location = "http://www.jdate.co.il/default.asp?prm=49782"
}

/*****************Jdate Start*************************************************************/

function submitCupid()
{
	document.cupidSearch.submit()
}
function submitJdate()
{
	document.jDateSearch.submit()
}
function SetAge()
{
	//cupidSearch.AgeRangeID.value = tempForm.Age.value;
	jDateSearch.AgeRangeID.value = tempForm.Age.value;
}

function SetArea()
{
	//cupidSearch.AreaCode1.value = tempForm.AreaCode.value;
	jDateSearch.AreaCode1.value = tempForm.AreaCode.value;

}

function SetGender()
{
	//cupidSearch.SeekingGenderID.value = tempForm.Gender.value;
	jDateSearch.SeekingGenderID.value = tempForm.Gender.value;
	SetGenderId();
}
function SetGenderId()
{
	//cupidSearch.GenderID.value = (tempForm.Gender.options[tempForm.Gender.selectedIndex].value == 4 ? 2 : 1);
}
/*****************Jdate End*************************************************************/

/******************Start Mavhena Scripts***********************************************/
function showMavhena(mavId)
{
	document.getElementById("mav" + mavId).style.display='block';
	document.getElementById("pointer" + mavId).style.visibility='visible';
	
}

function hideMavhena(mavId)
{
	document.getElementById("mav" + mavId).style.display='none';
	document.getElementById("pointer" + mavId).style.visibility='hidden';
}

function showMavhenaAkbarCase(mavId)
{
	for (j=0; j<10; j++)
	{
		if ((j != mavId) && (document.getElementById("mav" + j) != null))
			document.getElementById("mav" + j).style.display='none';
	}
	document.getElementById("mav" + mavId).style.display='block';
}

function hideMavhenaAkbarCase(mavId)
{
	document.getElementById("mav" + mavId).style.display='none';
}

function print_M_Link(fontColor,linkid,txt,lineColor,showLine)
{
	var maxwidth
	if (screen.width > 1000 )
	{
		maxwidth = 110;
	}
	else
	{
		maxwidth = 62;
	}

	document.write ("<tr><td width="+maxwidth+" align='center' class='TDTopBottunStyle'><a onMouseOver='onOver(this)' onMouseout='onOut(this)' class='aLinkStyle' style='color: " + fontColor + ";' href='mavhena/count.asp?LinkId=" + linkid + "' target='_blank'>" + txt + "</a></td></tr>")
	if (showLine != 0)
	{
		document.write ("<tr><td class='TDRightLeftStyle'><div style='border-top: " + lineColor + " 1px solid;'></div></td></tr>")
		// special case for jobnet link (before the last one I draw two lines)
		// Uri Sittan 17/09/2006.
		if (parseInt(linkid)==106)
		{
			document.write ("<tr><td style='height:1px;'></td></tr><tr><td class='TDRightLeftStyle'><div style='border-top: " + lineColor + " 1px solid;'></div></td></tr>")
		}		
	}
}

function print_M_Menu(txt,linkid,textColor,lineColor)
{
	var arlinkid
	var artxt
	
	arlinkid = linkid.split(',')
	artxt = txt.split(',')
	
	for (i=0; i < arlinkid.length; i++ )
	{
		print_M_Link(textColor,arlinkid[i],artxt[i],lineColor,i);
	}
}

function writeImage(img800,img1024,link)
{
		
	if (link != "")
	{
		link = "href='mavhena/count.asp?LinkId="+link+"'";
	}
			
	if (screen.width > 1000 )
	{
		document.write ("<a "+link+" target='_blank'><img border=0 src='/mavhena/images/"+img1024+"'></a><br>");
	}
	else
	{
		document.write ("<a "+link+" target='_blank'><img border=0 src='/mavhena/images/"+img800+"'></a><br>");
	}
}

maxResize = true;
function hideAkbar()
{	
	if ( (document.getElementById("akbarBannerId") != null ) && (maxResize == true) )
	{
		if (document.getElementById('tapuzMainW').scrollTop > 1550 )
		{
			document.getElementById('akbarBannerId').style.display = "none";
		}
		else
		{
			document.getElementById('akbarBannerId').style.display = "";
		}
	}
}

function mainResize()
{	
	//window.status = tapuzMainW.clientWidth

	if (window.screen.width > 1000)
	{
		maxSize = 952
	}
	else
	{
		maxSize = 776
		//maxSize = 700
	}
	
	if (document.getElementById('tapuzMainW').clientWidth < maxSize)
	{
		document.getElementById('akbarBannerId').style.display = "none"
		document.getElementById("tapuzrightW").style.height = 0
		document.getElementById("tapuzrightW").style.width = 0
		maxResize = false
	}
	else
	{
		if (window.screen.width != 800)
		{
			document.getElementById('akbarBannerId').style.display = ""
			document.getElementById("tapuzrightW").style.height = '92%'
			if (akbarIsDisplayed == 1)
			{
				if (screen.width > 800 && screen.width < 1280) 
					document.getElementById("tapuzrightW").style.width = '47';
				else if(screen.width > 1279)
					document.getElementById("tapuzrightW").style.width = '300';
			}
			else
			{
				if (screen.width > 800 && screen.width < 1280) 
					document.getElementById("tapuzrightW").style.width = '147';
				else if(screen.width > 1279)
					document.getElementById("tapuzrightW").style.width = '300';
			}
			maxResize = true
		}
		else
		{
			document.getElementById('akbarBannerId').style.display = ""
			document.getElementById("tapuzrightW").style.height = 0
			document.getElementById("tapuzrightW").style.width = 0
			maxResize = true
		}
	}
}

function mainResize1()
{	
	//window.status = tapuzMainW.clientWidth
	
	spinBanner2Id.style.left = '60%';
	if (window.screen.width > 1000)
	{
		maxSize = 880
	}
	else
	{
		maxSize = 670
	}
	
	if (document.getElementById('tapuzMainW').clientWidth < maxSize)
	{
		document.getElementById('akbarBannerId').style.display = "none"
		maxResize = false
	}
	else
	{
		document.getElementById('akbarBannerId').style.display = ""
		maxResize = true
	}
}


function onOver(obj)
{
	obj.style.fontWeight = 'bold';
}

function onOut(obj)
{
	obj.style.fontWeight = 'normal';
}

function mavhenaFotter(logoFotter,logoFotter800)
{
	document.write("</table></td></tr>");
	document.write("<Tr><td>");
	writeImage(logoFotter,logoFotter800,'')
	document.write("</td></tr></table></div></td></tr>")
	document.write("</table>")
}

function mavhenaFotterAkbarCase(logoFotter,logoFotter800)
{
	document.write("</table></td></tr>");
	document.write("<Tr><td>");
	writeImage(logoFotter,logoFotter800,'')
	document.write("</td></tr></table></td></tr>")
	document.write("</table>")
}

function mavhenaHeader(i,bgColor,logo,linkId,logoHeader,logoHeader800,borderColor)
{
	document.write("<table onMouseOver=showMavhena(" + i + ",'" + bgColor + "') border='0' cellpadding=0 align='center' cellspacing=0 onMouseout='hideMavhena(" + i + ")'>")
	document.write("<tr>");
	document.write("<Td width='75'>");
	document.write("<a href='mavhena/count.asp?LinkId=" + linkId + "' target='_blank'><img border=0 src='/mavhena/images/" + logo + "'></a>");
	document.write("</td>");
	document.write("<td  style='padding: 8 0 10 0;'>");
	document.write("<hr id='pointer" + i + "' size=5 class='pointerStyle' style='color: "+ bgColor +";' noshade>");
	document.write("</td>");
	//document.write("</tr>");
	//document.write("<tr>");
	document.write("<td valign='top'>");
	document.write("<div id='mav" + i + "' class='mavStyle'>");
	document.write("<table border='0' cellpadding=0 style='z-index: 2;' cellspacing=0 border=0>");
	document.write("<Tr><td>");

	writeImage(logoHeader800,logoHeader,linkId);

	document.write("</td></tr>");
	document.write("<tr><td>");
	document.write("<table bgColor='" + bgColor + "' width='100%' style='border-right: " + borderColor + " 1px solid; border-left: " + borderColor + " 1px solid; ' cellspacing=0 border=0 cellpadding=0>");
}

function mavhenaHeaderAkbarCase(i,bgColor,logo,linkId,logoHeader,logoHeader800,borderColor)
{
	document.write("<table onMouseOver=showMavhena(" + i + ",'" + bgColor + "') border='0' cellpadding=0 align='center' cellspacing=0 onMouseout='hideMavhena(" + i + ")'>")
	document.write("<tr>");
	document.write("<Td width='75'>");
	document.write("<a href='mavhena/count.asp?LinkId=" + linkId + "' target='_blank'><img border=0 src='/mavhena/images/" + logo + "'></a>");
	document.write("</td>");
	document.write("<td  style='padding: 8 0 10 0;'>");
	document.write("<hr id='pointer" + i + "' size=5 class='pointerStyle' style='color: "+ bgColor +";' noshade>");
	document.write("</td>");
	//document.write("</tr>");
	//document.write("<tr>");
	document.write("<td valign='top'>");
	document.write("<div id='mav" + i + "' class='mavStyle'>");
	document.write("<table border='0' cellpadding=0 style='z-index: 2;' cellspacing=0 border=0>");
	document.write("<Tr><td>");

	writeImage(logoHeader800,logoHeader,linkId);

	document.write("</td></tr>");
	document.write("<tr><td>");
	document.write("<table bgColor='" + bgColor + "' width='100%' style='border-right: " + borderColor + " 1px solid; border-left: " + borderColor + " 1px solid; ' cellspacing=0 border=0 cellpadding=0>");
}
/********************End Mavhena Scripts**********************************************/

/********************Start Shimushon Scripts**********************************************/
//click Link
function cL(useId) 
{
	//xmlSendClick = new ActiveXObject("Microsoft.XMLDOM");
	sURL = "TapuzHomePage/Shoping/admin/addCount2.asp?useId="+useId;
	//xmlSendClick.async = true;
	//xmlSendClick.load(sURL);

	//str = new String()
	//str = "http://www." + strLink

	window.open(sURL,'_self');
}
//print Use
function pU(useCat,useName,useId,useBgColor,isFirst)
{
	if (useBgColor == 1)
	{
		useBgColor = "bgcolor=#E1E2E4"
	}
	else
	{
		useBgColor = "bgcolor=#FFFFFF"
	}
	//the first item
	if (isFirst==1)
	{
		document.write("<tr " + useBgColor + ">")
		document.write("<td class='s-c'>" + useCat + ":</td>")
		document.write("<td style='color:#FC850D; font-size: 12px;'>")
		document.write("<a class='s-l' onClick='cL(" + useId + ")'>" + useName + "</a>&nbsp;|&nbsp;")
	}
	else if (isFirst==0)
	{//the middle item
		document.write("<a class='s-l' onClick='cL(" + useId + ")'>" + useName + "</a>&nbsp;|&nbsp;")
	}
	else
	{//the last item
		document.write("<a class='s-l' onClick='cL(" + useId + ")'>" + useName + "</a>")
	}
}

function printHeader()
{
	document.write("<table width='400'align='center' cellpadding='0' cellspacing='0' border='0' dir='rtl'>")
	document.write("<tr>")
	document.write("<td align='center'>")
	document.write("<img src='homepageimages/shimushTitle.gif' border='0'><br>")
	document.write("</td>")
	document.write("</tr>")
	document.write("<tr>")
	document.write("<td>")
	document.write("<table class='shimushonBorder'  cellpadding=0 cellspacing=0 border=0>")
}

function printFotter()
{
	document.write("</table></td></tr><tr>")
	document.write("<td align='center'>")
	document.write("<img src='homepageimages/downFrams.gif' border='0'><br>")
	document.write("</td>")
	document.write("</tr>")
	document.write("</table>")
}
function openTdTr()
{
	document.write("</td></tr>")
}
function closeTdTr()
{
	document.write("</td></tr>")
}

function pLS(usecat,useId,useName,useBgColor)
{
	var arUseId
	var arUseName
	
	arUseId = useId.split(',')
	arUseName = useName.split(',')
	
	openTdTr();
		
		pU(usecat,arUseName[0],arUseId[0],useBgColor,1)
		
		for (i=1; i < arUseId.length-1; i++ )
		{
			pU(usecat,arUseName[i],arUseId[i],useBgColor,0);
		}
		pU(usecat,arUseName[i],arUseId[i],useBgColor,2);
	
	closeTdTr();
}
/********************End Shimoshon Scripts**********************************************/

/********************Start Shdera Scripts**********************************************/
InTafrit = true
function showTafrit(leftPos,widthPos,who)
{
	InTafrit=true
	document.getElementById(who).style.pixelWidth = widthPos + 6
	document.getElementById(who).style.left = leftPos
	document.getElementById(who).style.bottom = 45
	document.getElementById(who).style.bottom = 46
	if (document.getElementById("datingCont")!=null)
		//akbarBannerIdTran.style.display= ''
		//akbarBannerId.style.display= 'none'
		document.getElementById("datingCont").style.display = "none"
	
	//Samsung Video
	try
	{
		window.parent.document.getElementById("SamsungPalyerTD").style.visibility = "hidden";
	}
	catch(x){}
}
function HideTafrit(who)
{	
	try
	{
		if (InTafrit==false)
		{
			document.getElementById(who).style.bottom = 10001
			document.getElementById(who).style.bottom = 10000
			window.toolbar.document.getElementById("TopBorder").innerHTML = "<table border='0' width='100%' cellpadding='0' cellspacing='0'><tr><td width='100%' bgcolor='#8A8A8A' height='1' nowrap></td></tr></table>"
			if (document.getElementById("datingCont")!=null)
				//akbarBannerIdTran.style.display= 'none'
				//akbarBannerId.style.display= ''
				document.getElementById("datingCont").style.display = "inline"

			//Samsung Video
			window.parent.document.getElementById("SamsungPalyerTD").style.visibility = "";

		}
	}
	catch(ex)
	{
	}
}
function HideTafritPrev(who)
{
	window.setTimeout("HideTafrit('" + who + "')",100)
}
function HideAllBut(who)
{
	if ("Tbar1"!=who)
	{
		if(document.getElementById("Tbar1"))
		{
			document.getElementById("Tbar1").style.bottom = 10001
			document.getElementById("Tbar1").style.bottom = 10000
		}
	}
	if ("Tbar2"!=who)
	{
		if(document.getElementById("Tbar2"))
		{
			document.getElementById("Tbar2").style.bottom = 10001
			document.getElementById("Tbar2").style.bottom = 10000
		}
	}
	if ("Tbar3"!=who)
	{
		if(document.getElementById("Tbar3"))
		{
			document.getElementById("Tbar3").style.bottom = 10001
			document.getElementById("Tbar3").style.bottom = 10000
		}
	}
	if ("Tbar4"!=who)
	{
		if(document.getElementById("Tbar4"))
		{	
			document.getElementById("Tbar4").style.bottom = 10001
			document.getElementById("Tbar4").style.bottom = 10000
		}
	}
	if ("Tbar5"!=who)
	{
		if(document.getElementById("Tbar5"))
		{		
			document.getElementById("Tbar5").style.bottom = 10001
			document.getElementById("Tbar5").style.bottom = 10000
		}
	}
	if ("Tbar6"!=who)
	{
		if(document.getElementById("Tbar6"))
		{		
			document.getElementById("Tbar6").style.bottom = 10001
			document.getElementById("Tbar6").style.bottom = 10000
		}
	}
	if ("Tbar7"!=who)
	{
		if(document.getElementById("Tbar7"))
		{		
			document.getElementById("Tbar7").style.bottom = 10001
			document.getElementById("Tbar7").style.bottom = 10000
		}
	}
}

function printShderaLine()
{
	document.write("<tr><td bgcolor='#8C8A8C' height='1' nowrap></td></tr>")
}

function printShderaLink(linkId,txt)
{
	var dest = ""
	dest = 'http://www.tapuz.co.il/shdera/count.asp?LinkId=' + linkId
	document.write("<tr><td onclick=window.open('"+dest+"','new') style='cursor:pointer'><div style='font-size: 12px; color: white;'><strong dir='rtl'>"+txt+"</strong></font></td></tr>");
}

function printShderaHeader()
{
		document.write("<tr><td width='7' height='7' ><img src='images/TopLeftCorner.gif' width='7' height='7' border='0'></td>")
		document.write("<td background='images/UpPixMid.gif'></td>")
		document.write("<td width='7' height='7'><img src='images/TopRightCorner.gif' width='7' height='7' border='0'></td>")
		document.write("</tr><tr><td background='images/BgLeftBorder.gif' valign='bottom'></td>")
		document.write("<td><table width='100%' border='0' cellpadding='0' cellspacing='0'>")
		document.write("<tr><td><table dir='rtl' bgcolor='#A5A2A5' width='100%' border='0' cellpadding='0' cellspacing='4'>")
}

function printShderaFotter()
{
		document.write("</table></td></tr><tr><td height='10' align='center' bgcolor='#A5A6A5'>")
		document.write("<img src='images/toolBarArrow2.gif' width='95' height='10'><br>")
		document.write("</td></tr></table></td>")
		document.write("<td background='images/BgRightBorder.gif' valign='bottom'></td>")
		document.write("</tr></table>")
}

function printShdera(linkid,txt)
{
	var arTxt
	var arLink

	arTxt = txt.split(",,")
	arLink = linkid.split(",,")

	for (i=0; i < arLink.length; i++)
	{
		printShderaLink(arLink[i],arTxt[i])
		printShderaLine();
	}
}
/********************End Shdera Scripts**********************************************/


/********************Start Dotomi banners Scripts**********************************************/
/*
function DisplayAds (sitepage, position, width, height, isDotomi) {
	DisplayAdsMain (sitepage, position, width, height, isDotomi);
}

function BrowserCheck() 
{
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b.toLowerCase().indexOf("explorer")!=-1) this.b = "ie"
  	else this.b = b
	this.version = navigator.appVersion
	this.v = parseInt(this.version)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns5 = (this.b=="ns" && this.v==5)
	this.ns6 = (this.b=="ns" && this.v==6)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (this.version.indexOf('MSIE 4')>0)
	this.ie5 = (this.version.indexOf('MSIE 5')>0)
	this.ie55 = (this.version.indexOf('MSIE 5.5')>0)
	this.ie6 = (this.version.indexOf('MSIE 6')>0)
	this.ie7 = (this.version.indexOf('MSIE 7')>0)
	this.min = (this.ns||this.ie)
}

tapuz_browser_is = new BrowserCheck();

function DisplayAdsMain (sitepage, position, width, height, isDotomi) {
	var oas = 'http://rm.tapuz.co.il/RealMedia/ads/';
	var RN = new String (Math.random());
	var RNS = RN.substring(2,11);
	var oaspage = sitepage + '/1' + RNS + '@' + position;
				
//	document.write ('<script src=http://www.jumpad.co.il/jumpbanner/jumpout4.asp?md=27&cp=70&iframeID=mainBanner></script>')
	document.write ('\<IFRAME WIDTH=' + width + ' HEIGHT=' + height + ' NORESIZE ID=mainBanner SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 SRC="' + oas + 'adstream_sx.ads/' + oaspage + '"\>');
	if (tapuz_browser_is.ns ) 
	{
		document.write ('\<SCRIPT LANGUAGE="JavaScript1.1" SRC="' + oas + 'adstream_jx.ads/' + oaspage + '">');
		document.write ('\<\!-- --\>');
		document.write ('\<\/SCRIPT\>');
	}
	document.write ('\<\/IFRAME\>');
}


function DisplayAdsSpecial (sitepage, position, width, height) {
	DisplayAdsMainSpecial (sitepage, position, width, height);
}

function DisplayAdsMainSpecial (sitepage, position, width, height) {
	var oas = 'http://rm.tapuz.co.il/RealMedia/ads/';
	var RN = new String (Math.random());
	var RNS = RN.substring(2,11);
	var oaspage = sitepage + '/1' + RNS + '@' + position;
	
		
		//document.write ('\<div id=aaa style="BORDER-RIGHT: blue 1px solid; BORDER-TOP: blue 0px solid; ; LEFT: 100px;  BORDER-LEFT: blue 1px solid; WIDTH: 50; BORDER-BOTTOM: blue 1px solid; POSITION: absolute; TOP: 20px; HEIGHT: 50;z-index:2">');
		document.write ('\<SCRIPT LANGUAGE="JavaScript1.1" SRC="' + oas + 'adstream_jx.ads/' + oaspage + '">');
		document.write ('\<\!-- --\>');
		document.write ('\<\/SCRIPT\>');
		//document.write ('\<\/div\>');
		
	
}

function DisplayFloatingAds(sitepage, position)
{
	
		var oas = 'http://rm.tapuz.co.il/RealMedia/ads/';
		var RN = new String (Math.random());
		var RNS = RN.substring(2,11);

		var oaspage = sitepage + '/1' + RNS + '@' + position;
		var JSSource = oas + 'adstream_jx.ads/' + oaspage
	
		if (tapuz_browser_is.ie5 || tapuz_browser_is.ie6) {		
			document.write('<SCRIPT LANGUAGE="JavaScript1.1" SRC="' + JSSource + '">');
			document.write('</SCRIPT>');
		}
	
}
*/
/********************END Dotomi banners Scripts**********************************************/
/********************start Getit Scripts**********************************************/
function ChangeProd(itm)
{
	if(itm==1)
	{
		HpTop1.style.display="none";
		HpTop2.style.display="none";
		HpTop3.style.display="block";
	}
	else if(itm==2)
	{
		HpTop1.style.display="block";
		HpTop2.style.display="none";
		HpTop3.style.display="none";
	}
	else if(itm==3)
	{
		HpTop1.style.display="none";
		HpTop2.style.display="block";
		HpTop3.style.display="none";
	}
	else if(itm==11)
	{
		HpTop1.style.display="none";
		HpTop2.style.display="block";
		HpTop3.style.display="none";
	}
	else if(itm==12)
	{
		HpTop1.style.display="none";
		HpTop2.style.display="none";
		HpTop3.style.display="block";
	}
	else if(itm==13)
	{
		HpTop1.style.display="block";
		HpTop2.style.display="none";
		HpTop3.style.display="none";
	}
}
/********************END Getit Scripts**********************************************/
/********************start copidBanner Scripts**********************************************/
function submitCupid(){
	document.cupidSearch.submit()
}
function SetGenderId()
{
	cupidSearch.GenderID.value = (cupidSearch.SeekingGenderID.options[cupidSearch.SeekingGenderID.selectedIndex].value == 4 ? 2 : 1);
}
/********************END copidBanner Scripts**********************************************/

function closeAdvScreen()
{
	document.getElementById("AdvMonster").style.display = "none"
	document.getElementById("TapuzKeter").style.display = ""
}


function getUserIp()
{

}