function goTo(url, new_win){
	if( new_win==1 ){
		win=window.open(url);
		win.focus();
	}else{
		window.location.href = url;
	}
}

function set_onload(path,is_mako_car,fb_url,twit_url){ 

	var top_strip = 
		"<table width=\"755\" align=\"center\">"+
		"<tr>"+
		"<td width=\"273\">"+		
		"<div id='SharingBox' width='273px;'>"+
		"<div style='position:;'>"+
			"<table width=\"50\" dir=\"ltr\">"+
				"<tr>"+
				"<td valign=\"top\" style=\"padding-top:3px;\"><g:plusone count=\"false\"></g:plusone></td>"+
				"<td><a onclick=\"stat( '../', '1636', '', '' )\"; target=\"_blank\" href=\"http://twitter.com/share?original_referer=www.yad2.co.il&url="+twit_url+"\"><img src='http://images.yad2.co.il/Pic/yad2new/page/tw_share.png' border='0'  width='25' height='24' /></a></td>"+
				"<td><a onclick=\"stat( '../', '1635', '', '' )\"; target=\"_blank\" href=\"http://www.facebook.com/sharer.php?u="+fb_url+"\"><img src='http://images.yad2.co.il/Pic/yad2new/page/facebook_share.png' border='0'  width='23' height='24' /></a></td>"+
				"</tr>"+
			"</table>"+			
		"</div>"+
		"</div>"+
		"</td>"+
		"<td width=\"482\">"+
		"<table width=\"482\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">" +
			"<tr>" +			
				"<td width='34' height='20' align='right' valign='bottom'>" +
					"<a href='http://www.yad2.co.il' class='bar'><IMG SRC='http://images.yad2.co.il/Pic/site_images/newcar/images/yad2_logo_s.jpg' WIDTH='34' HEIGHT='19' BORDER='0' ALT='לוח יד2'></a></td>" +
				"<td height='20' align='right' valign='bottom' style='padding=bottom:4px;'>" +
					"<a href='javascript:void(0)' onClick=\"openWindow('"+ path +"adver.php', 'adver', 540, 570)\" class='bar'>פרסם באתר</a></td>" +
				"<td valign='bottom'>" +
					"<img src='http://images.yad2.co.il/Pic/site_images/newcar/images/home4_03.gif' width='13' height='20' alt=''></td>" +
				"<td width='58' height='20' align='right' valign='bottom' style='padding=bottom:4px;'>" +
					"<a href='javascript:void(0)' onClick=\"openWindow('"+ path +"Contact.php', 'Contact', 540, 570)\" class='bar'>צור קשר</a></td>" +
				"<td valign='bottom'>" +
					"<img src='http://images.yad2.co.il/Pic/site_images/newcar/images/home4_05.gif' width='15' height='20' alt=''></td>" +
				"<td width='73' height='20' align='right' valign='bottom' style='padding=bottom:4px;'>" +
					"<a href='javascript:void(0);'  onClick=\"openWindow('"+ path +"TellAFriend.php', 'TellAFriend', 540, 500)\" class='bar'>המלץ לחבר</a></td>" +
				"<td valign='bottom'>" +
					"<img src='http://images.yad2.co.il/Pic/site_images/newcar/images/home4_07.gif' width='20' height='20' alt=''></td>" +
				"<td width='81' height='20' align='right' valign='bottom' style='padding=bottom:4px;'>" +
					"<a href='javascript:if(document.all) window.external.AddFavorite(\"http://newcar.yad2.co.il\",\"קטלוג רכב חדש - לוח יד2\")' onMouseOver='return window.status=\"הוסף למועדפים\"' class='bar'>הוסף למועדפים</a></td>" +
				"<td valign='bottom'>" +
					"<img src='http://images.yad2.co.il/Pic/site_images/newcar/images/home4_09.jpg' width='14' height='20' alt=''></td>" +
				"<td width='85' height='20' align='right' valign='bottom' style='padding=bottom:4px;'>" +
					"<a href='javascript:void(0)' onClick=\"this.style.behavior='url(#default#homepage)';this.setHomePage('http://newcar.yad2.co.il/');\" onMouseOver=\"return window.status='הפוך לדף הבית'\" onMouseOut='return window.status=\"\"' class='bar'>הפוך לדף הבית</a></td>" +
				"<td valign='bottom'>" +
					"<img src='http://images.yad2.co.il/Pic/site_images/newcar/images/home4_11.gif' width='16' height='20' alt=''></td>" +
				"<td>" +
					"<img src='http://images.yad2.co.il/Pic/site_images/newcar/images/home4_12.gif' width='6' height='20' alt=''></td>" +
			"</tr>" +
		"</table>" +
		"</td>"+				
		"</tr>"+
		"</table>";
			
			;
	if (is_mako_car == null && document.getElementById("top_strip")) {
		var strip_div = document.getElementById("top_strip");
		strip_div.innerHTML = top_strip;
	}
}

function hide_movie_banner(){
		
		//alert("hide_movie_banner!!!!!");
	if( document.getElementById("movie_banner") ){
		document.getElementById("movie_banner").innerHTML='';
		document.getElementById("movie_banner").style.width=1;
		document.getElementById("movie_banner").style.height=1;
		document.getElementById("movie_banner").display='none';
		var myAjax = new Ajax.Request(
			'http://newcar.yad2.co.il/updatecookies.php'		
		);	
	}
	if( document.getElementById("show_movie") ){
		var url=document.getElementById("show_movie").src;
		var url2 = url.replace("&as=1", "");
		url = url2.replace("&as=0", "");
		url=url+"&as=1";
			//alert(url);
		document.getElementById("show_movie").src=url;
	}
}

function show_movie_banner(path){
		//alert("hide_movie_banner!!!!!");
	if( document.getElementById("movie_banner") ){
		document.getElementById("movie_banner").style.width=400;
		document.getElementById("movie_banner").style.height=500;
		document.getElementById("movie_banner").display='none';

		var so = new SWFObject(path+"flash/movie/A.swf", "obj_movie_banner", "400", "500", "8", "");
		so.addParam("quality", "high");
		so.addParam("Scale", "ExactFit");
		so.addParam("wmode", "Transparent");
		so.write("movie_banner");
	}
}

function CheckOnlyNumber(){
   if ((event.keyCode>0 && event.keyCode<48 && event.keyCode!=8 && event.keyCode!=46)  || (event.keyCode>57 && event.keyCode<96) || event.keyCode > 105) 
	 {   
	   event.returnValue = false;
	   alert("!אנא הזן ספרות בלבד ")
	 }
}
