var site = "";
if(document.cookie.indexOf("brand=msn")!=-1||location.search.indexOf("?brand=msn")!=-1)
site="themarker_msn";

var nameMonth = new Array(10);
nameMonth[0]=""
nameMonth[1]=""
nameMonth[2] = "פברואר"
nameMonth[3]=""
nameMonth[4] = "אפריל"
nameMonth[5]=""
nameMonth[6] = "יוני"
nameMonth[8]=""
nameMonth[7]=""
nameMonth[9] = "ספטמבר"

function act(i,image) 
{
	if (navigator.appVersion.indexOf("4")!=-1)
	{
    	if (document.images)
		{
			document.images[i].src = image;
		}
	}
}         

function go(form) 
{
	location=form.selectmenu.value
}

function surfto(form) {
	var myindex=form.select1.selectedIndex
	if (form.select1.options[myindex].value != 0) 
	{
    	url=form.select1.options[myindex].value;
		popupWin=window.document.open (url,'menu','height=450,width=190,scrollbars=yes,resizable=yes');
	    popupWin.focus();
	}	 
}

function sub()
{
	document.form1.submit();
}

function createArray (size)
{
	this.length = size;
	for (var i = 0; i <= size; i++)
	{
		this[i] = null
	}
}

function send()
{
	num  = document.kelim.stam.selectedIndex;
	var sites = new createArray(13);
	sites[0] = "/ibo/tools/event.jhtml?application=8";
	sites[1] = "/ibo/tools/event.jhtml?application=1";
	sites[2] = "/ibo/shenhav/graphWindow.jhtml?chosen=5002&market=ny&chT=intraday&types=index&whichGraph=יומי&graphTitle=נאסד&quot;ק";
	sites[3] = "/ibo/shenhav/graphWindow.jhtml?chosen=5001&market=ny&chT=intraday&types=index&whichGraph=יומי&graphTitle=דאו";
	sites[4] = "/ibo/shenhav/graphWindow.jhtml?chosen=1230&market=ta&chT=intraday&types=index&whichGraph=יומי&graphTitle=ת&quot;א 100";
	sites[5] = "/ibo/shenhav/graphWindow.jhtml?chosen=1065&market=ta&chT=intraday&types=index&whichGraph=יומי&graphTitle=מעו&quot;ף";
	sites[6] = "/ibo/tools/allFinanceFrame.jhtml?application=11";
	sites[7] = "/ibo/tools/allFinanceFrame.jhtml?application=21";
	sites[8] = "/ibo/idex/graphIdex.jhtml";		
	sites[9] = "/ibo/tools/event.jhtml?application=2&gif=finance";	
	sites[10] = "/ibo/tools/ta25.jhtml";
	sites[11] = "/ibo/game/TheMarkerGame.jhtml";						
	sites[12] =	 "/ibo/tools/clal/ShowAllReturns.jhtml";
	url= sites[num];
	if (document.kelim.stam.selectedIndex ==0 || document.kelim.stam.selectedIndex ==1 ||  document.kelim.stam.selectedIndex ==6 || document.kelim.stam.selectedIndex ==7 || document.kelim.stam.selectedIndex==8 || document.kelim.stam.selectedIndex==9 || document.kelim.stam.selectedIndex==10 || document.kelim.stam.selectedIndex==11|| document.kelim.stam.selectedIndex==12)
		location.href = sites[num];
	else
	{
		 popupWin=window.document.open ( url,'menu','height=394,width=452,top=0,left=0,status=no,toolbar=no,menubar=no,resizable=no,scrolling=no');
	     popupWin.focus();
	}
}

function openTalkBabk(Pname) 
{
	NewVin = open(Pname,"displayWindow","width=350,height=375,top=150,left=150,screenX=150,screenY=150,status=no,toolbar=no,menubar=no, resizable=no,scrollbars=no");
	NewVin.focus();
}

function openNetking() 
{
	var a;
	a=window.open("http://radio.netking.com/radiothemarker.asp","radio","height=410,width=430,scrollbar=0,toolbar=0,status=0,resizable=0,menubar=0");
}
	
function openRadioTMC() 
{	
	var a;								
	a=window.open("/ibo/RadioTMC.html","radio","width=431,height=370,scrollbar=0,toolbar=0,status=0,resizable=0,menubar=0,top=100,left=150");
}

function pressEnter()
{
	if(window.event.keyCode==13)
	{
		return FindSubmit();
	}
}
 
function checkChar(obj)
{
	var str = ":;)(*&^%$#@!?<>||~{}[]\\/"
	var userStr = obj.value;
	var c ;
	for (i=0 ; i < userStr.length ; )
	{
		c = userStr.charAt(i);
		if (str.indexOf(c) > -1)
			userStr = clearStr(userStr,i);
		else
			i++;
	}
	userStr = clearSpace(userStr);	
	obj.value = userStr;
}
	
function clearSpace(userStr)
{
	while(userStr.indexOf(" + ")>-1)
		userStr =userStr.replace(" + ","+");
	while(userStr.indexOf(" , ")>-1)
		userStr =userStr.replace(" , ",",");
	while(userStr.indexOf("+ ")>-1)
		userStr =userStr.replace("+ ","+");
	while(userStr.indexOf(" +")>-1)
		userStr =userStr.replace(" +","+");
    while(userStr.indexOf(", ")>-1)
		userStr =userStr.replace(", ",",");
	while(userStr.indexOf(" ,")>-1)
		userStr =userStr.replace(" ,",",");
	while(userStr.indexOf(" - ")>-1)
		userStr =userStr.replace(" - ","-");
	while(userStr.indexOf("- ")>-1)
		userStr =userStr.replace("- ","-");
	while(userStr.indexOf(" -")>-1)
		userStr =userStr.replace(" -","-");
	while(userStr.indexOf("  ")>-1)
		userStr = userStr.replace("  "," ");
	while(userStr.indexOf("++")>-1)
		userStr = userStr.replace("++","+");
	while(userStr.indexOf(",,")>-1)
		userStr = userStr.replace(",,",",");
	while(userStr.indexOf("--")>-1)
		userStr = userStr.replace("--","-");
	return userStr;
}
	
function  clearStr(str,index)	
{
	str = str.substring(0,index) + str.substring(index+1,str.length);
	return str;
}

function checkday()
{
	if(document.arc_form)
	{
		var d = new Date()
		document.arc_form.recToDD.selectedIndex  =d.getDate();
		document.arc_form.recToMM.selectedIndex =d.getMonth()+1;
		year =d.getFullYear()-2000;
		switch (year) 
		{
	  		case -1 :
	    		year = 5;
				break;
			case 0 :
	      		year = 4;
				break;
			case 1 :
	      		year = 3;
				break;
			case 2 :
	      		year = 2;
				break;
			case 3 :
	      		year = 1;
				break;
		} 
		document.arc_form.recToYY.selectedIndex =year;
		var timeInSec = d.getTime();
		//-5356800000,-13046400000
		timeInSec = timeInSec -5356800000  ;
		d.setTime(timeInSec);
		document.arc_form.recFromDD.selectedIndex =d.getDate();		
		document.arc_form.recFromMM.selectedIndex =d.getMonth()+1;
		year =d.getFullYear()-2000;
		switch (year) 
		{
	  		case -1 :
	    		year = 5;
				break;
			case 0 :
	      		year = 4;
				break;
			case 1 :
	      		year = 3;
				break;
			case 2 :
	      		year = 2;
				break;
			case 3 :
	      		year = 1;
				break;
		} 
		document.arc_form.recFromYY.selectedIndex =year;
	}
}
	
	
//	function checkValDay(dd,mm,yyyy)
function checkValDay(dd,mm,yyyy)
{
	///	alert("in checkDay" + dd + mm + yyyy);
	if (dd > 27)
	{
	//		alert("in checkDay");
		if (((mm== 4) || (mm== 6) || (mm== 9) || (mm== 11)) && (dd == 31))
		{
			alert("בחודש " + mm + " אין " + dd + " יום");
			return "0";
		}	
		if (mm == 2)
		{
			if (dd > 29)
			{
				alert("בחודש פברואר אין " + dd + " יום");
				return "0";
			}
			if (dd == 29 && ((yyyy/4)!=parseInt(yyyy/4)))
			{
			//	alert(dd/4)
			//	alert(parseInt(dd/4))
				alert("בשנה זו בחודש פברואר אין " + dd + " יום");
				return "0";
			}
		}
	}
			return "1";
}	

function FindSubmit()
{	
	check = checkValDay(arc_form.recFromDD.value,arc_form.recFromMM.value,arc_form.recFromYY.value);
	if (check == "0")
		return false;
	check = checkValDay(arc_form.recToDD.value,arc_form.recToMM.value,arc_form.recToYY.value);
	if (check == "0")
		return false;					
	checkChar(document.arc_form.text);
	checkChar(document.arc_form.quote);
	var found=document.arc_form.text.value
	var quote=document.arc_form.quote.value
	var howmany=found.split('"')
	var howmany1=found.length
	var s=howmany.length-1
	if ( (howmany1==1) && (quote==""))
	{
		NewVin = open("/ibo/archive/too_short.html","displayWindow","width=560,height=270,top=150,left=150,screenX=150,screenY=150,status=no,toolbar=no,menubar=no, resizable=no,scrolling=no");
		NewVin.focus();
		document.arc_form.text.value="";
		return false;
	}
	if ( (howmany1==1) && (quote !=""))
	{
		document.arc_form.text.value="";
	}
 	if (s >= 1 )
	{
		NewVin = open("/ibo/archive/wrong.html","displayWindow","width=560,height=285,top=150,left=150,screenX=150,screenY=150,status=no,toolbar=no,menubar=no, resizable=no,scrolling=no");
		NewVin.focus();
		return false;
	}
	document.arc_form.submit();		
}	




function FindSubmitDay()
{	
	dayForm();
	checkChar(document.arc_form.text);
	var found=document.arc_form.text.value
	var howmany=found.split('"')
	var howmany1=found.length
	var s=howmany.length-1
	if (howmany1==1 )
	{
		NewVin = open("/ibo/archive/tooShort.html","displayWindow","width=560,height=270,top=150,left=150,screenX=150,screenY=150,status=no,toolbar=no,menubar=no, resizable=no,scrolling=no");
		NewVin.focus();
		document.arc_form.text.value="";
		return false;
	}
 	if (s >= 1 )
	{
		NewVin = open("/ibo/archive/wrong.html","displayWindow","width=560,height=285,top=150,left=150,screenX=150,screenY=150,status=no,toolbar=no,menubar=no, resizable=no,scrolling=no");
		NewVin.focus();
		return false;
	}
	document.arc_form.submit();		
}	
	
function OpenHelp()	
{
   	NewVin = open("/ibo/archive/help.html","displayWindow","width=580,height=300,top=150,left=150,screenX=150,screenY=150,scrollbars=yes,status=no,toolbar=no,menubar=no, resizable=no");
    NewVin.focus();
}

function dayForm()
{
	var d = new Date()
	var day
	var month
	var year
	
	// check if Day smaller then 10
	if (d.getDate()<10)
		day ="0" + d.getDate();
	else
	// asaf change this - 29 not in month feb	
	//day =d.getDate()+1;	
		day =d.getDate();	
	document.arc_form.recToDD.value  =day;
	// check if Month smaller then 10
	if (d.getMonth()<9)
		month ="0" +(d.getMonth()+1);		
	else
		month =d.getMonth()+1;	
	document.arc_form.recToMM.value =month;
	year =d.getFullYear();
	document.arc_form.recToYY.value =year;
	// change to 1 month before
	var timeInSec = d.getTime();
	// timeInSec = timeInSec - 2678400000  ;
	//-5356800000,13046400000
	 timeInSec = timeInSec -5356800000;
	d.setTime(timeInSec);
	// check if Day smaller then 10
	if (d.getDate()<10)
		day ="0" + d.getDate();
	else
		month =d.getDate()+1;	
	document.arc_form.recFromDD.value =day;	
	if (day > 26)
		document.arc_form.recFromDD.value =day-4;	
	else
		document.arc_form.recFromDD.value =day;		
	// check if Month smaller then 10
	if (d.getMonth()<9)
		month ="0" +(d.getMonth()+1);	
	else
		month =d.getMonth()+1;	
	document.arc_form.recFromMM.value =month;
	year =d.getFullYear();
	document.arc_form.recFromYY.value =year;
}

function jumpout(layer,rnd,start,stop) 
{
	if ((rnd >= start) && (rnd <= stop) && (layer != "walls") && (layer != "market"))
		return true;
	else
		return false;
}

function banner(noPosition,l1,l2,l3,l4)
{
var cookieContent = new String(document.cookie);
var site = "themarker";
if(cookieContent.indexOf("brand=msn")!=-1||location.search.indexOf("?brand=msn")!=-1)
site="themarker_msn";

ls = document.location;
ls = ls.toString();
if((ls.indexOf("themarker.com/eng") != -1)&&(noPosition!=1))
site="ENG";
position = new Array("","WIDTH=468 HEIGHT=60","WIDTH=468 HEIGHT=60","WIDTH=109 HEIGHT=65","WIDTH=109 HEIGHT=65","WIDTH=124 HEIGHT=31","WIDTH=124 HEIGHT=31","WIDTH=124 HEIGHT=150","WIDTH=124 HEIGHT=180","WIDTH=80 HEIGHT=31","WIDTH=124 HEIGHT=150","WIDTH=92 HEIGHT=60","WIDTH=420 HEIGHT=108","WIDTH=420 HEIGHT=108","WIDTH=124 HEIGHT=450","","WIDTH=124 HEIGHT=31","WIDTH=124 HEIGHT=180","WIDTH=210 HEIGHT=210","","WIDTH=286 HEIGHT=210","WIDTH=115 HEIGHT=17","WIDTH=285 HEIGHT=20","WIDTH=240 HEIGHT=32","WIDTH=123 HEIGHT=48","WIDTH=740 HEIGHT=90","WIDTH=92 HEIGHT=60","WIDTH=730 HEIGHT=31","WIDTH=124 HEIGHT=50","WIDTH=124 HEIGHT=450","WIDTH=92 HEIGHT=60","WIDTH=92 HEIGHT=60","WIDTH=470 HEIGHT=39","WIDTH=250 HEIGHT=31","WIDTH=360 HEIGHT=31","WIDTH=123 HEIGHT=33","WIDTH=92 HEIGHT=60","WIDTH=124 HEIGHT=70","WIDTH=92 HEIGHT=60","WIDTH=124 HEIGHT=70","WIDTH=288 HEIGHT=176","WIDTH=92 HEIGHT=60","WIDTH=60 HEIGHT=20","WIDTH=120 HEIGHT=72","WIDTH=468 HEIGHT=60");
posSrcs = new Array(" ","468x60","468x60","109x65","109x65","124x31","124x31","124x150","124x180","80x31","124x150","92x60","420x108","420x108","124x450","","124x31","124x180","210x210","","286x210","115x17","285x20","240x32","123x48","740x90","92x60","730x31","124x50","124x450","92x60","92x60","470x39","250x31","360x31","123x33","92x60","124x70","92x60","124x70","288x176","92x60","60x20","120x72","468x60");
var now = new Date();
var RND = now.getSeconds();
var frameUrl = "http://dclk"
var domainName = new String(self.location);
if (domainName.indexOf("test.themarker.com") != -1) frameUrl += "5";
frameUrl += ".themarker.com/html.ng/site=" + site + "&adsize=" + posSrcs[noPosition] + "&" + (l1=="none"?"":"layer="+l1+"&") + (l2=="none"?"":"layer2="+l2+"&") + (l3=="none"?"":"layer3="+l3+"&") + (l4=="none"?"":"layer4="+l4+"&") + "adtype=hp&page_position=" + noPosition + "&Rnd=" + RND;
if (site=="themarker_msn" && noPosition==18)
	document.write("<IFRAME name='ih' src='http://ads.msn.co.il/ad.htm?site=msnthemarker&amp;size=210x210&amp;page=all&amp;rtc= RND' width='210' height='210' marginwidth='0' marginheight='0' frameborder='0' scrolling='no'></IFRAME>");
else
	{
		if (cookieContent.indexOf("dotomi")!=-1 && noPosition==1)
		{
			var dotomiSrc = "http://dmm.dotomi.com/dmm/servlet/dmm?rurl=" + escape(frameUrl).replace(new RegExp('\\+','g'),'%2B') + "&pid=400&mtg=0&ms=1&btg=1&mp=1";
	        document.write("<scr"+"ipt src=\"" + dotomiSrc + "\" language=\"javaScript\"></scr"+"ipt>");
	    }
		else
		{ 
			document.write("<IFRAME " + position[noPosition] + " MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=000000 SRC=\"" + frameUrl + "\"></IFRAME>");
		}
	}
document.write('</div>');	
}

function bannerNoDotomi(noPosition,l1,l2,l3,l4)
{
var cookieContent = new String(document.cookie);
var site = "themarker";
if(cookieContent.indexOf("brand=msn")!=-1||location.search.indexOf("?brand=msn")!=-1)
site="themarker_msn";
position = new Array("","WIDTH=468 HEIGHT=60","WIDTH=468 HEIGHT=60","WIDTH=109 HEIGHT=65","WIDTH=109 HEIGHT=65","WIDTH=124 HEIGHT=31","WIDTH=124 HEIGHT=31","WIDTH=124 HEIGHT=150","WIDTH=124 HEIGHT=150","WIDTH=80 HEIGHT=31","WIDTH=124 HEIGHT=150","WIDTH=92 HEIGHT=60","WIDTH=420 HEIGHT=108","WIDTH=420 HEIGHT=108","WIDTH=124 HEIGHT=450","","WIDTH=124 HEIGHT=31","WIDTH=124 HEIGHT=180","WIDTH=210 HEIGHT=210","","WIDTH=286 HEIGHT=210","WIDTH=115 HEIGHT=17","WIDTH=285 HEIGHT=20","WIDTH=240 HEIGHT=32","WIDTH=123 HEIGHT=48","WIDTH=740 HEIGHT=90","WIDTH=92 HEIGHT=60","WIDTH=730 HEIGHT=31","WIDTH=124 HEIGHT=50","WIDTH=124 HEIGHT=450","WIDTH=92 HEIGHT=60","WIDTH=92 HEIGHT=60","WIDTH=470 HEIGHT=39","WIDTH=250 HEIGHT=31","WIDTH=360 HEIGHT=31","WIDTH=123 HEIGHT=33","WIDTH=92 HEIGHT=60","WIDTH=124 HEIGHT=70","WIDTH=92 HEIGHT=60","WIDTH=124 HEIGHT=70","WIDTH=288 HEIGHT=176","WIDTH=92 HEIGHT=60","WIDTH=60 HEIGHT=20","WIDTH=120 HEIGHT=72");
posSrcs = new Array(" ","468x60","468x60","109x65","109x65","124x31","124x31","124x150","124x150","80x31","124x150","92x60","420x108","420x108","124x450","","124x31","124x180","210x210","","286x210","115x17","285x20","240x32","123x48","740x90","92x60","730x31","124x50","124x450","92x60","92x60","470x39","250x31","360x31","123x33","92x60","124x70","92x60","124x70","288x176","92x60","60x20","120x72");
var now = new Date();
var RND = now.getSeconds();
var frameUrl = "http://dclk"
var domainName = new String(self.location);
if (domainName.indexOf("test.themarker.com") != -1) frameUrl += "5";
frameUrl += ".themarker.com/html.ng/site=" + site + "&adsize=" + posSrcs[noPosition] + "&" + (l1=="none"?"":"layer="+l1+"&") + (l2=="none"?"":"layer2="+l2+"&") + (l3=="none"?"":"layer3="+l3+"&") + (l4=="none"?"":"layer4="+l4+"&") + "adtype=hp&page_position=" + noPosition + "&Rnd=" + RND;
if (site=="themarker_msn" && noPosition==18)
	document.write("<IFRAME name='ih' src='http://ads.msn.co.il/ad.htm?site=msnthemarker&amp;size=210x210&amp;page=all&amp;rtc= RND' width='210' height='210' marginwidth='0' marginheight='0' frameborder='0' scrolling='no'></IFRAME>");
else
	{
		document.write("<IFRAME " + position[noPosition] + " MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=000000 SRC=\"" + frameUrl + "\"></IFRAME>");
	}
document.write('</div>');	
}


function bannerNew(noPosition,l1,l2,l3,l4,posSrcs,positionStr)
{
var cookieContent = new String(document.cookie);
var site = "themarker";
if(cookieContent.indexOf("brand=msn")!=-1||location.search.indexOf("?brand=msn")!=-1)
site="themarker_msn";

var now = new Date();
var RND = now.getSeconds();
var frameUrl = "http://dclk"
frameUrl += ".themarker.com/html.ng/site=" + site + "&adsize=" + posSrcs + "&" + (l1=="none"?"":"layer="+l1+"&") + (l2=="none"?"":"layer2="+l2+"&") + (l3=="none"?"":"layer3="+l3+"&") + (l4=="none"?"":"layer4="+l4+"&") + "adtype=hp&page_position=" + noPosition + "&Rnd=" + RND;
if (site=="themarker_msn" && noPosition==18)
	document.write("<IFRAME name='ih' src='http://ads.msn.co.il/ad.htm?site=msnthemarker&amp;size=210x210&amp;page=all&amp;rtc= RND' width='210' height='210' marginwidth='0' marginheight='0' frameborder='0' scrolling='no'></IFRAME>");
else{
	if (noPosition==1){
		//dotomi
		if (typeof dotomiManager != "" && dotomiManager.isShowMessage()){
			var dotomiSrc = "http://dmm.dotomi.com/dmm/servlet/dmm?rurl=" + escape(frameUrl).replace(new RegExp('\\+','g'),'%2B') + "&pid=400&mtg=0&ms=1&btg=1&mp=1";
			document.write("<scr"+"ipt src=\"" + dotomiSrc + "\" language=\"javaScript\"></scr"+"ipt>");
			dotomiManager.setRefreshCookie();
		}
		else
			document.write("<IFRAME " + positionStr + " MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=000000 SRC=\"" + frameUrl + "\"></IFRAME>");
	}
	else
		document.write("<IFRAME " + positionStr + " MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=000000 SRC=\"" + frameUrl + "\"></IFRAME>");
}
document.write('</div>');	
}


function headline()
{
	if (location.hostname=="themarker.msn.co.il"||location.search.indexOf("brand=msn")!=-1||document.cookie.indexOf("brand=msn")!=-1)
	{
		if(document.cookie.indexOf("brand=msn")==-1)
		{
			document.cookie="brand=msn;path=/";
		}
	document.write("<IFRAME src='/ibo/msn/Header1.html' name='headframe' width='100%' height='130' scrolling='no' frameborder='0'></IFRAME>");
	}
	else
	{
		document.write("<IFRAME src='/ibo/droplet/main/headline.jhtml' name='headframe' width='100%' height='30' scrolling='no' frameborder='0'></IFRAME>");
	}
}

function checkMsn()
{
	if(location.hostname=="themarker.msn.co.il"||location.search.indexOf("brand=msn")!=-1||document.cookie.indexOf("brand=msn")!=-1)
		return 1;
	return 0;
}

function openGraphWin(Pname,width,height)
{
	NewVin = open(Pname,"GraphWindow","width=" + width + ",height=" + height + ",top=0,left=0,screenX=150,screenY=150,status=no,toolbar=no,menubar=no,resizable=no,scrolling=no");
	NewVin.focus();
}

function sky_ad(sky_layer)
{
	if (site!="themarker_msn")
	{
	var sWidth = screen.width;
	if (sWidth >= 1024) 
		{
			var x = 875 + ((sWidth - 1024) / 2);
			document.write("<div name=\"bigAdd\" style=\"position: absolute; height: 450; width: 124; left: " + x + "; top: 75;\">");
			document.write("<iframe src=\"http://dclk.themarker.com/html.ng/site=themarker&page_position=14&adsize=124x450&layer=" + sky_layer + "\" height=\"450\" width=\"124\" scrolling=\"No\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\"></iframe>");
			document.write("</div>");
		}
	}
}

function sky_ad_newSite(sky_layer)
{
	if (site!="themarker_msn")
	{
	var sWidth = screen.width;
	if (sWidth >= 1024) 
		{
			var x = 883 + ((sWidth - 1024) / 2);
			document.write("<div name=\"bigAdd\" style=\"position: absolute; height: 600; width: 120; left: " + x + "; top: 96;\">");
			document.write("<iframe src=\"http://dclk.themarker.com/html.ng/site=themarker&page_position=61&adsize=120x600&layer=" + sky_layer + "\" height=\"600\" width=\"120\" scrolling=\"No\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\"></iframe>");
			document.write("</div>");
		}
	}
}

function openWin(Pname,width,height) 
{
	NewVin = open(Pname,"displayWindow","width=455,height=340,top=0,left=0,screenX=150,screenY=150,status=no,toolbar=no,menubar=no, resizable=no,scrolling=no");
	NewVin.focus();
}

function openMoreLinks(posion,div)
{
	if(div.style.display == "none")
		div.style.display = "inline";
	else
		div.style.display = "none";
}

function bannerHandler(noPosition,l1,l2,l3,l4,posSrcs,positionStr,site,trace)
{
var bannerURI = "";
var frameStr  = "";
var now = new Date();
var RND = now.getSeconds();
var frameUrl = "http://dclk"
frameUrl += ".themarker.com/html.ng/site=" + site + "&adsize=" + posSrcs + "&" + (l1=="none"?"":"layer="+l1+"&") + (l2=="none"?"":"layer2="+l2+"&") + (l3=="none"?"":"layer3="+l3+"&") + (l4=="none"?"":"layer4="+l4+"&") + "adtype=hp&page_position=" + noPosition + "&Rnd=" + RND;
if (trace == "true")
{
	frameUrl+="&amp;"+"params.styles=trace";
}
if (site=="themarker_msn" && noPosition==18)
	frameStr  = "<IFRAME name='ih' src='http://ads.msn.co.il/ad.htm?site=msnthemarker&amp;size=210x210&amp;page=all&amp;rtc= RND' width='210' height='210' marginwidth='0' marginheight='0' frameborder='0' BORDERCOLOR=#000000 scrolling='no'></IFRAME>";
else if (site=="dotomi" && noPosition==1){
	var dotomiSrc = "http://dmm.dotomi.com/dmm/servlet/dmm?rurl=" + escape(frameUrl).replace(new RegExp('\\+','g'),'%2B') + "&pid=400&mtg=0&ms=1&btg=1&mp=1";
	frameStr  = "<scr"+"ipt src=\"" + dotomiSrc + "\" language=\"javaScript\"></scr"+"ipt>";
}
else if (site=="aonline"){
	frameUrl = "http://dclk.themarker.com/html.ng/site=AOnline&adsize=" + posSrcs + "&aolayer0=" + l1 + "&aolayer1=" + l2 +"&aolayer2=" + l3 + "&adtype=hp&aopage_position=" + noPosition + "&Rnd=" + RND;
	if (trace == "true")
	{
		frameUrl+="&amp;"+"params.styles=trace";
	}
	bannerURI  = frameUrl;
	frameStr   = "<IFRAME name='ih' ID=add" + noPosition + " " + positionStr + " MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=000000 SRC="+frameUrl+"></IFRAME>";
}
else{ 
	bannerURI  = frameUrl;
	frameStr   = "<IFRAME name='ih'" + positionStr + " MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=#000000 SRC=\"" + frameUrl + "\"></IFRAME>";
}
	return frameStr+"@@@"+bannerURI ;
}

function openWinDetails(url,viewData)
{
	if(viewData != "")	
		window.open(url,"win",viewData);
	else
		window.open(url,"win");
}

function showAdd() 
{
	if (newsAdd) 
	{
	if (newsAdd.style.display == 'none')
		newsAdd.style.display = 'block';
	else
		newsAdd.style.display = 'none';
	}
}

function bannerNewCreative(site,noPosition,l1,l2,l3,l4,posSrcs,positionStr){
	var site = site;
	var now = new Date();
	var RND = now.getSeconds();
	var frameUrl = "http://dclk"
	frameUrl += ".themarker.com/html.ng/site=" + site + "&adsize=" + posSrcs + "&" + (l1=="none"?"":"layer="+l1+"&") + (l2=="none"?"":"layer2="+l2+"&") + (l3=="none"?"":"layer3="+l3+"&") + (l4=="none"?"":"layer4="+l4+"&") + "adtype=hp&page_position=" + noPosition + "&Rnd=" + RND;
	document.write("<IFRAME " + positionStr + " MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=000000 SRC=\"" + frameUrl + "\"></IFRAME>");
	document.write('</div>');	
}

