
// BROWSER

Browser = function()
{
	this.N4 = (document.layers) ? true : false;
	this.IE = (document.all) ? true : false;
	this.N6 = (document.getElementById) ? true : false;
};

Browser.prototype.whichLayer = function(id)
{
	if (this.N4){		return document.layers[id];
	} else if (this.IE){	return document.all[id].style;
	} else if (this.N6){	return document.getElementById(id).style;}
};

Browser.prototype.getLayerXpos = function(id)
{
	return parseInt(this.whichLayer(id).left);
};

Browser.prototype.getLayerYpos = function(id)
{
	return parseInt(this.whichLayer(id).top);
};

Browser.prototype.setLayerPos = function(id, left, top)
{
	var lay = this.whichLayer(id);
	lay.left = left;lay.top = top;
};

Browser.prototype.moveLayer = function(id)
{
	var IE = navigator.appName.indexOf("Microsoft") != -1;
};

Browser.prototype.sendLayerPos = function(id)
{
	var IE = navigator.appName.indexOf("Microsoft") != -1;
};

Browser.prototype.writeToLayer = function(id, obj)
{
	if (this.N4) {
		document.layers[id].document.close();
		document.layers[id].document.write(obj);
		document.layers[id].document.close();
	} else {
        	if (this.IE) {
			eval("document.all." + id + ".innerHTML='" + obj + "'");
		} else {
			document.getElementById(id).innerHTML = obj;
		}
	}
};


// FLASH
function addFlash(src, w, h, wmode, quality) {
	document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0\" id=\""+ src +"\" width=\"" + w + "\" height=\"" + h + "\" align=\"middle\">");
	document.write("<param name=\"allowScriptAccess\" value=\"always\" />");
	document.write("<param name=\"FlashVars\" value=\"sectionMain=home\" />");
	document.write("<param name=\"movie\" value=\"" + src + "\" />");
	document.write("<param name=\"wmode\" value=\"" + wmode + "\" />");
	document.write("<param name=\"quality\" value=\"" + quality + "\" />");
	document.write("<embed src=\"" + src + "\" wmode=\"" + wmode + "\" quality=\"" + quality + "\" width=\"" + w + "\" height=\"" + h + "\" align=\"middle\" swLiveConnect=true id=\"" + src + "\" name=\"" + src +"\"  allowScriptAccess=\"always\" FlashVars=\"sectionMain=home\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />");
	document.write("</object>");
}


// DIV

function setFlashHeight(newH)
	{
		if (newH == 100){
			document.getElementById('flashResizer').style.height = 100+"%";
		}else{
			document.getElementById('flashResizer').style.height = newH+"px";
		}
	}

function setFlashWidth(newW)
	{
		if (newW == 100){
			document.getElementById('flashResizer').style.width = 100+"%";
		}else{
			document.getElementById('flashResizer').style.width = newW+"px";
		}
	}

function setFlashVisibility()
	{
		document.getElementById('flashResizer').style.visibility = "hidden";
	}

	