function initAd(){
	if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval('document.all.sponsorAdDiv.style');
	else if(ns)	adDiv=eval('document.layers["sponsorAdDiv"]');
	else if(w3)	adDiv=eval('document.getElementById("sponsorAdDiv").style');
	randAd=Math.ceil(Math.random()*chanceAd);
        if (ie||w3)
        adDiv.visibility="visible";
        else
        adDiv.visibility ="show";
	if(randAd==1) adshow();
}
function adshow(){
//if(adCount<adTime*10){adCount+=1;
	if (ie){documentWidth  =truebody().offsetWidth/2+truebody().scrollLeft+262;
	documentHeight =198;
	adDiv.left=documentWidth-200+calunit;adDiv.top =documentHeight-200+calunit;}	
	else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset-20;
	documentHeight =198;
	adDiv.left=documentWidth+92+calunit;adDiv.top =documentHeight-200+calunit;} 
	else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;
	documentHeight=198;
	adDiv.left=documentWidth+92+calunit;adDiv.top =documentHeight-200+calunit;} 
	//setTimeout("adshow()",1000);}
	//else closeAd();
}

function closeAd(){
if (ie||w3)
adDiv.display="none";
else
adDiv.visibility ="hide";
}

function validate_search(formObj) {
	if (formObj.keyword.value.length == 0) {
		alert("Please enter a search term.");
		formObj.keyword.focus();
		return false;
	}
	return true;
}
function validate_newsletter(formObj) {
	if (formObj.newsletter.value.length == 0) {
		alert("Please enter your email address.");
		formObj.newsletter.focus();
		return false;
	}
	apos = formObj.newsletter.value.indexOf("@");
	dotpos = formObj.newsletter.value.indexOf(".");
	lastpos = formObj.newsletter.value.length-1;
	if (apos<1 || lastpos-dotpos<2) {
		alert("Please enter your email address in correct format.");
		formObj.newsletter.focus();
		return false;		
	}
}