﻿
function PutAtpKeepAliveFO(config, showFlash) {
	var atpKepAliveParams = config.swfUrl + 'AtpKeepAlive.swf?awData=' + escape(config.awData) + '&amp;tis=' + config.intervalInSeconds + '&amp;ttr=' + config.timesToRun + '&amp;AtpKaService=' + escape(config.serviceUrl);
	
    var atpFo;
    if (showFlash && showFlash == true)
        atpFo = new SWFObject(atpKepAliveParams, "AtpkeepAlive", "444px", "44px", "7", "#ffffff", true);
    else
        atpFo = new SWFObject(atpKepAliveParams, "AtpkeepAlive", "1px", "1px", "7", "#ffffff", true);
        
    //Ext.onReady(function() { atpFo.write("AtpKeepAlivePH"); });
	
	/* for sites without SWFObject
	if (showFlash && showFlash == true)
		document.write ('<object width="444" height="44" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="movie" value="' + atpKepAliveParams + '"><embed src="' + atpKepAliveParams + '" width="444" height="44"></embed></object>');
	else
		document.write ('<object width="1" height="1" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="movie" value="' + atpKepAliveParams + '"><embed src="' + atpKepAliveParams + '" width="1" height="1"></embed></object>');
    */
}


//Add to favorites.
function AddToFavorites(url,title)
{
	if(window.sidebar) //Mozilla Firefox Bookmark.
	{ 
		window.sidebar.addPanel(title, url, "");
	} 
	else if(window.external) //IE Favorite.
	{ 
		window.external.AddFavorite(url, title); 
	}
	else if(window.opera && window.print) //Opera Hotlist.
	{ 
		return true;
	}
}

var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}

