var isDOM = (document.getElementById ? true : false); 
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
var isNS = navigator.appName == "Netscape";

function getRef(id) {
	if (isDOM) return document.getElementById(id);
	if (isIE4) return document.all[id];
	if (isNS4) return document.layers[id];
}

function moveRightEdge() {
	var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;

	if (isDOM) {
		yMenuFrom = parseInt (divMenu.style.top, 0);
		yMenuTo = (isNS ? window.pageYOffset : document.body.scrollTop);
	}
	timeoutNextCheck = 100;

	if (yMenuFrom != yMenuTo) {
		yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20);
	if (yMenuTo < yMenuFrom)
		yOffset = -yOffset;
	if (isNS4)
		divMenu.top += yOffset;
	else if (isDOM)
		divMenu.style.top = parseInt (divMenu.style.top, 0) + yOffset;
		timeoutNextCheck = 10;
	}
	setTimeout ('moveRightEdge()', timeoutNextCheck);
}

function embedflash( flname, width, height, trans)  //"+height+"
{
    document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+width+"' height='"+height+"'>");
    if ( trans == "yes" )
        document.write("<param name='wmode' value='transparent'>");

    document.write("<param name='movie' value='"+flname+"'>");
    document.write("<param name='quality' value='high'>");
    document.write("<embed src='"+flname+"' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"'></embed>");
    document.write("</object>");
}
