function checkBrowser(browserType,browserVersion){
	var is_ie=false;
	var is_nn=false;
	var is_ff=false;
	var appVer=navigator.appVersion.toLowerCase();
	var agt=navigator.userAgent.toLowerCase();
	var minorVersion=parseFloat(appVer);
	var iePos=appVer.indexOf("msie");
	var is_ie=(iePos!=-1);
	var is_ff=(agt.indexOf("firefox")!=-1&&!is_ie);
	var is_nn=(agt.indexOf("mozilla")!=-1&&!is_ie&&!is_ff);
	var is_safari = ((agt.indexOf('safari')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;
	if (is_ie) minorVersion=parseFloat(appVer.substring(iePos+5,appVer.indexOf(";",iePos)));
	else if (is_ff||is_nn) {
		var minorVersion=(navigator.vendorSub)?navigator.vendorSub:0;
		if(!minorVersion) {
			minorVersion=agt.indexOf('rv:');
			minorVersion=agt.substring(minorVersion+3);
			minorVersion=minorVersion.substring(0,3);
		}
		minorVersion=parseFloat(minorVersion);
	}
	if ((navigator.vendor)&&((navigator.vendor=="netscape6")||(navigator.vendor=="netscape"))&&(is_nn)) minorVersion=parseFloat(navigator.vendorSub);
	if (browserType.toUpperCase()=="IE"){
		if (is_ie&&minorVersion>=browserVersion) return true;
		else return false;
	}else if (browserType.toUpperCase()=="FF"){
		if (is_ff&&minorVersion>=browserVersion) return true;
		else return false;
	}else if (browserType.toUpperCase()=="NN"){
		if (is_nn&&minorVersion>=browserVersion) return true;
		else return false;
	}else if (browserType.toUpperCase()=="SF"){
		return true;
	}else{
		return false;
	}
}
d = document;
function findElements(name,tag){
	e=new Array();
	if (tag) e=(document.getElementsByTagName)?document.getElementsByTagName(name):null;
	else e=(document.getElementsByName)?document.getElementsByName(name):null;
	return e;
}
function findElement(id){
	e=(document.getElementById)?document.getElementById(id):(document.all)?document.all[id]:(document.layers)?document.layers[id]:null;
	if (!e) e=findElements(id,true)[0];
	if (!e) e=findElements(id)[0];
	if (e) e.css=(e.style)?e.style:e;
	return e;
}
function writeLayer(id,data){
	obj=findElement(id);
	if (obj&&typeof obj.innerHTML!="undefined") obj.innerHTML=data;
}
function showLayer(id){
	obj=findElement(id);
	if (obj){
		if (obj.style) obj=obj.style;
		obj.display="block";
	}
}
function hideLayer(id){
	obj=findElement(id);
	if (obj){
		if (obj.style) obj=obj.style;
		obj.display="none";
	}
}
function moveLayer(id,x,y){
	obj=findElement(id);
    obj.css.left=x+"px";
    obj.css.top=y+"px";
}
function getURL(X){
	POR(X,640,480);
}
function POR(LOC,PW,PH){
	POPNAME=Math.ceil(Math.random()*1000000);
	PORWIN=window.open("",POPNAME,"WIDTH="+PW+",HEIGHT="+PH+",top="+Math.round((screen.availHeight/2)-(PH/2))+",left="+Math.round((screen.availWidth/2)-(PW/2))+",resizable=no,scrollbars=no,status=no,location=no,toolbar=no,menubar=no,directories=no,titlebar=no,personalbar=no");
	PORWIN.document.open();
	PORWIN.document.write("<HTML><HEAD><TITLE>emiledeon.com</TITLE><META HTTP-EQUIV=\"imagetoolbar\" CONTENT=\"no\"></HEAD><BODY bgcolor=\"#5E644A\" scroll=no topmargin=0 leftmargin=0 rightmargin=0 bottomargin=0 marginHEIGHT=0 marginWIDTH=0><div style=\"position:absolute; top:0px;left:0px\"><a href=\"JavaScript:opener=self;self.close();\" ONMOUSEOVER=\"window.status='';return true;\"><IMG SRC="+LOC+" WIDTH="+PW+" HEIGHT="+PH+" border=0></a></div></BODY></HTML>")
	PORWIN.document.close();
}
function slider(){
	// define variables
	IE = checkBrowser('IE',0);
	fl = findElement("floater");
	docWidth = IE ? d.body.clientWidth : innerWidth;
	docHeight = IE ? d.body.clientHeight : innerHeight;
	docScroll = IE ? d.body.scrollHeight : d.body.offsetHeight;
	scrollPos = IE ? d.body.scrollTop : pageYOffset;
	
	// do the math
	if (IE) fromTop=192;
	else fromTop=185;
	edge = ((scrollPos+docHeight)-fl.offsetHeight);
	dn=Math.round((edge+1-fl.offsetTop)/4);
	fromBottom = docScroll-fl.offsetHeight-54;
	up=Math.round((fl.offsetTop-edge+1)/4);
	
	if (fl.offsetTop<fromTop){
		if (IE) fl.style.pixelTop=fromTop;
		else fl.style.top=fromTop;
	}else if (edge>fl.offsetTop&&fromBottom>edge){
		if (IE) fl.style.pixelTop+=dn;
		else fl.style.top=fl.offsetTop+dn;
	}
	if (fromBottom<=edge){
		if (IE) fl.style.pixelTop=fromBottom;
		else fl.style.top=fromBottom;
	}else if (edge<fl.offsetTop&&fl.offsetTop>fromTop){
		if (IE) fl.style.pixelTop-=up;
		else fl.style.top=fl.offsetTop-up;
	}
}
function floatBottom(){
	window.setInterval("slider()",1);
}
function createFlash(width,height,location,majorVersion){
	flashObject=""+
	"<OBJECT WIDTH="+width+" HEIGHT="+height+" CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" CODEBASE=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+majorVersion+",0,0,0\">\r"+
	"	<PARAM NAME=movie VALUE="+location+">\r"+
	"	<PARAM NAME=quality VALUE=high>\r"+
	"	<PARAM NAME=wmode VALUE=transparent>\r"+
	"	<PARAM NAME=menu VALUE=false>\r"+
	"	<EMBED SRC="+location+" WIDTH="+width+" HEIGHT="+height+" QUALITY=high WMODE=transparent MENU=false TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></EMBED>\r"+
	"</OBJECT>";
	return flashObject;
}
function findFlash(version){
	var flashVersion=0;
	if (window.ActiveXObject){
		for (i=2; i<=100; i++){
			try {
				if (eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+i+"');")) flashVersion=i;
			}
			catch(e){}
		}
	}else if (navigator.plugins && navigator.plugins.length){
		np = navigator.plugins["Shockwave Flash"];
		if (np){
			if (np.description) flashVersion = np.description.charAt(np.description.indexOf('.')-1);
		}
		if (navigator.plugins["Shockwave Flash 2.0"]) flashVersion = 2;
	}
	if (flashVersion>=version) return true;
	else return false;
}
var onloadArray = new Array();
var bodyOnload = false;
function add_onload(functionName){
	if (bodyOnload!=true){
		if (document.getElementsByTagName("body")[0]!= null){
			var doc_body = document.getElementsByTagName("body")[0];
			if (typeof(doc_body.onload)=="function"&&doc_body.onload.toString().indexOf('executeFunctions')==-1) onloadArray[onloadArray.length]=doc_body.onload;
			bodyOnload=true;
		}
	}
	onloadArray[onloadArray.length] = functionName;
	window.onload=executeFunctions;
}
function executeFunctions() {
	for (i in onloadArray) {
		if (typeof(onloadArray[i])=="function") onloadArray[i].apply();
		else eval(onloadArray[i]);
	}
}