function pauza(p) {
	d = new Date()
	while (1) {
		ms=new Date()
		if( ms-d > p ) {break;}
	}
}

function verif_home (url_1, ref123) {
// script care seteaza url_1 ca HomePage in IE, DACA referrerul este google; daca vizitatorul a acceptat, se apeleaza scriptul de incrementare a contorului de HomePages ;)
	if (!ref123 || ref123=='') ref123=document.referrer.toString();
	//alert(ref123);
	var a=navigator.userAgent;
	var db=document.body;
	var lochref=window.location.href;
	//var radacina=lochref.substring(0,lochref.indexOf(".ro/")+4);			// radacina url-ului (ex: http://euroechipe.123start.ro/turul_frantei_stiri.php are radacina http://euroechipe.123start.ro/
	var radacina=((lochref.indexOf("/www.")>0)?("http://www."):("http://"));		// vede daca e canonica sau nu
	
	url_1 = url_1.toString();
	//alert (url.indexOf("."));
	if (!url_1.indexOf("www.")) return false;
	var url_2 = "http://"+url_1.substring(11,url_1.length);
	
	var url_3 = "http://www.ronews.net/";
	var url_4 = "http://"+url_3.substring(11,url_3.length);
	//alert (url_2);
	//return false;
	
	db.style.behavior='url(#default#homepage)';
	var was_hp=(db.isHomePage(url_1) || db.isHomePage(url_2) || db.isHomePage(url_3) || db.isHomePage(url_4));
	//alert(db.isHomePage(url_3));
	
	if (a.indexOf('MSIE')>=0 && ref123.indexOf('google')>=0 && !was_hp && document.all['fr_homepage']!=undefined) {
		//alert (radacina+" "+url_1+" "+url_2)
		//alert (radacina+" "+url_1+" "+url_2+" "+db.isHomePage(url_1)+" "+db.isHomePage(url_2)+" "+radacina);
		/*if (radacina=='http://www.')	db.setHomePage(url_1)
		else							db.setHomePage(url_2)*/
		db.setHomePage(url_1)
		document.all.fr_homepage.src='http://www.123start.ro/promoplus/inreghp.php?url='+url_1
		if (db.isHomePage(url_1) || db.isHomePage(url_2)) {
			//alert ('yes');
			document.all.fr_homepage.src='http://www.123start.ro/promoplus/inreghp.php?url='+url_1+'&count=yes'
			pauza(500)
		}
		else {
			//alert ('no')
			document.all.fr_homepage.src='http://www.123start.ro/promoplus/inreghp.php?url='+url_1+'&count=no'
			pauza(500)
		}
	}
}
