// Zentropy Comunicación Interactiva
// http://www.zentropyspain.com
// 
// Develop by Pedro Mujica [mudska]
// pedro.mujica@zentropyspain.com
// mudska@terra.es
// 
// Agosto de 2002
// *********************************
// API DHTML
function BrowserCheck() {
	var b = navigator.appName;
	if (b=="Netscape") this.b = "ns";
	else if (b=="Microsoft Internet Explorer") this.b = "ie";
	else this.b = b;
	this.version = navigator.appVersion;
	this.v = parseInt(this.version);
	this.ns = (this.b=="ns" && this.v>=4);
	this.ns4 = (this.b=="ns" && this.v==4);
	this.ns5 = (this.b=="ns" && this.v==5);
	this.ie = (this.b=="ie" && this.v>=4);
	this.ie4 = (this.version.indexOf('MSIE 4')>0);
	this.ie5 = (this.version.indexOf('MSIE 5')>0);
	this.min = (this.ns||this.ie);
}
is = new BrowserCheck();
function DL(id,nestref,frame) {
	if (!is.ns5 && !DL.set && !frame) DLInit();
	this.frame = frame || self;
	this.elm = this.event = this.frame.document.all[id];
	this.css = this.frame.document.all[id].style;
	this.doc = document;
	this.x = this.elm.offsetLeft;
	this.y = this.elm.offsetTop;
	this.w = (is.ie4)? this.css.pixelWidth : this.elm.offsetWidth;
	this.h = (is.ie4)? this.css.pixelHeight : this.elm.offsetHeight;
	this.id = id;this.nestref = nestref;
	this.obj = id + "DL";eval(this.obj + "=this");
}
function DLWrite(html) {this.event.innerHTML = html;}
DL.prototype.wr = DLWrite;
DLTest = new Function('return true');
function DLInit(nestref) {
	if (!DL.set) DL.set = true;
	if (is.ie) {
		for (var i=0; i<document.all.tags("DIV").length; i++) {
			var divname = document.all.tags("DIV")[i].id;
			var index = divname.indexOf("Div");
			if (index > 0) {eval(divname.substr(0,index)+' = new DL("'+divname+'")');}
		}
	}
	return true;
}
DL.nestRefArray = new Array();
DL.refArray = new Array();
DL.refArray.i = 0;
DL.set = false;
function CL(id,nestref,left,top,width,height,content,bgColor,visibility,zIndex,other) {
	var str = '\n<DIV id='+id+' style="position:absolute; left:'+left+'; top:'+top+'; width:'+width;
	if (height!=null) {
		str += '; height:'+height;str += '; clip:rect(0,'+width+','+height+',0)';
	}
	if (bgColor!=null) str += '; background-color:'+bgColor;
	if (zIndex!=null) str += '; z-index:'+zIndex;
	if (visibility) str += '; visibility:'+visibility;str += ';">'+((content)?content:'')+'</DIV>';
	if (nestref) {
		index = nestref.lastIndexOf(".");
		var nestlyr = (index != -1)? nestref.substr(index+1) : nestref;
		document.all[nestlyr].insertAdjacentHTML("BeforeEnd",str);
	}
	else {
		document.body.insertAdjacentHTML("BeforeEnd",str);
	}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////    B A N N E R   //////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function init(){
	b=document.getElementById('ZenGolf');
	b.style.position = "relative";
	bX = b.offsetLeft;
	bY = b.offsetTop;
	CL('golfDiv',null,bX,bY,472,64,null,null,null,30);
	golf = new DL('golfDiv');
	s='<OBJECT ID="golf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=472 HEIGHT=64>';
	s+='<PARAM NAME=movie VALUE="golf.swf"><PARAM NAME=menu VALUE=false><PARAM NAME=quality VALUE=high><PARAM NAME=wmode VALUE=transparent>';
	s+='<EMBED NAME="golf" src="golf.swf" wmode=transparent menu=false quality=high bgcolor=#FFFFFF  WIDTH=472 HEIGHT=64 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" swliveconnect=true></EMBED>';
	s+='</OBJECT>';
	golf.wr(s);
	return true;
}
window.onload = init;	
