function resetDots(){
	if(window.siteFlashHere) window.document["siteFlashHere"].resetDots();
	if(document.siteFlashHere) document.siteFlashHere.resetDots();
}
function changePopup(id){
	if($("mainBoxPopupText"+id).innerHTML==""){
		new Ajax.Request(homeUrl+"getPopup/"+(id+1), {
			method: 'post',
			onComplete: function(resp) {
				txt = resp.responseText;
				if(txt!="Not Found"){
					$$("div .mainBoxPopupText").each(function(ele){$(ele).style.display="none";});
					$("mainBoxPopupText"+id).innerHTML = txt;
					$("mainBoxPopup").setStyle({"left":arrayOfIds[id]+"px"});
					$("mainBoxPopupArrowBg").setStyle({"left":arrayArrowOfIds[id]+"px"});
					$("mainBoxPopupText"+id).style.display = "block";
					$("mainBoxPopup").style.display = "block";
				}
			}
		});
	}
	else{
		$$("div .mainBoxPopupText").each(function(ele){$(ele).style.display="none";});
		$("mainBoxPopup").setStyle({"left":arrayOfIds[id]+"px"});
		$("mainBoxPopupArrowBg").setStyle({"left":arrayArrowOfIds[id]+"px"});
		$("mainBoxPopupText"+id).style.display = "block";
		$("mainBoxPopup").style.display = "block";
	}
}
function marginFooter(){
	var ps = $$("#footerInnerMarquee h3");
	pWidth = 30;
	for(var j=0;j<ps.length;j++){
		pWidth += ps[j].offsetWidth +15;
	}
	$("footerInnerMarquee").style.width = pWidth+'px';
	
}
function initFooter(){
	delayBetween = 4000;
	lastPageNum = 0;
	pageNum = 1;
	LogoRowContainer = $$(".LogoRowContainer");
	setTimeout("changeFooter()",delayBetween,"JavaScript");
}
function changeFooter(){
	ele = LogoRowContainer[lastPageNum];
	newEle = LogoRowContainer[pageNum];
	lastPageNum = pageNum;
	new Effect.Fade(ele,{duration:3});
	new Effect.Appear(newEle,{
		duration:3,
		afterFinish:function(){
			setTimeout("changeFooter()",delayBetween,"JavaScript");
			if((pageNum+1)==maxPages)
				pageNum = 0;
			else
				pageNum++;
		}
	});
}
function createFlashPlayer(file,placeHolder,width,height,flashvar){
	var params = {"allowfullscreen": "true","allowScriptAccess": "always","wmode": "transparent","flashVars":flashvar};
	swfobject.embedSWF(file+".swf",placeHolder, width, height, "8", null, null, params, null);
}
