// CLIENT GENE / ATELIER 33 / ALL RIGHTS RESERVED / 2009/ http://www.atelier33.com
//----------------------
function AddToBMK()
{
	var browserName=navigator.appName; var browserVer=parseInt(navigator.appVersion);
	if (browserName=="Microsoft Internet Explorer" && browserVer>=4){window.external.AddFavorite(location.href, document.title);}
	else {alert(ExpBookmark1);}
}
//----------------------
function PopContainer(pvName, pvUrl, pvWi, pvHei, pvAnchID, isPopDiv)
{	
	if(isPopDiv)
	{
		var pvContent="<iframe id='PopContainerContent' name='PopContainerContent' src='"+pvUrl+"' width='100%' height='100%' scrolling='auto' frameborder='0' marginwidth='0' marginheight='0'></iframe>";

		var iWinWi=parseInt(document.body.offsetWidth); //var iPosX=parseInt((iWinWi/2)-(pvWi/2)+20)+"px";
		var iWinHei=parseInt(document.body.offsetHeight); //var iPosY=parseInt(((iWinHei/2)-(pvHei/2))+100)+"px";
		var iPosX=parseInt(iWinWi/2)-parseInt(pvWi/2);	
		var iPosY=GetPosY(GetDaID(pvAnchID))-parseInt(pvHei/2); 
		if (iPosY<=0){iPosY=100;}
		if (iPosY>=(iWinHei-(pvHei+100))){iPosY=iWinHei-(pvHei+100);}
		//alert("POSX="+iPosX+" | POSY="+iPosY);
		
		oWhich=GetDaID(pvName); 
		oWhich.style.width=pvWi+"px"; oWhich.style.height=pvHei+"px";
		oWhich.style.left=iPosX+"px"; oWhich.style.top=iPosY+"px"; 
		oWhich.innerHTML=pvContent;	ShowDiv(pvName);	
	}
	else
	{
		var winView=window.open(pvUrl, pvName,"menubar=yes,scrollbars=yes,resizable=yes,status=yes,width="+pvWi+",height="+pvHei+"");
	}
}
//----------------------
function SearchCheck1(pvForm, pvPage)
{
	var Dis=eval(pvForm); var bFlag=false;
	//var pvACT="310"; Dis.ACT.value=pvACT; 
	//var pvPage="hub.asp";
	var pvMeth="post";
	var pvTarg="_self";	
	
	if(Dis.PG){if(!Dis.PG.selectedIndex==0){bFlag=true}}
	if(Dis.AP){if(!Dis.AP.selectedIndex==0){bFlag=true}}
	if(Dis.DA){if(!Dis.DA.selectedIndex==0){bFlag=true}}
	if(Dis.CL){if(!Dis.CL.selectedIndex==0){bFlag=true}}
	if(Dis.PG){if(check_empty(Dis.KW.value)){bFlag=true; /*Dis.KW.value=GeneUtf8Encode(Dis.KW.value);*/ }}

	if (bFlag)	{Dis.action=pvPage; Dis.method=pvMeth; Dis.target=pvTarg; return true;}
	else		{alert(ExpSearchBlank); return false;}
}
//----------------------
function SearchSubmit1(pvForm){Dis=eval(pvForm); Dis.submit();}
//----------------------
function Browserdetect()
{
	var pvBrowser="NONE";
	//alert(navigator.userAgent);
	if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){pvBrowser="MSIE";}
	if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){pvBrowser="FF";}
	if (/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)){pvBrowser="OP";}
	return pvBrowser;
}
//----------------------
	
