// Java Document

/* Custom FXs */
function ToggleVisibility(obj, img)
{
	thisObj = document.getElementById(obj).style;
	if (thisObj.display == "block") {
		thisObj.display = "none";
		//
		expObj = document.getElementById(img);
		expObj.src = "../../images/expand.gif";
	}
	else {
		thisObj.display = "block";
		//
		expObj = document.getElementById(img);
		expObj.src = "../../images/collapse.gif";
	}

	/*
	obj.style.visibility = (obj.style.visibility == "hidden") ? "visible" : "hidden";
	obj.style.display = (obj.style.display == "none") ? "block" : "none";
	*/
}

function openWindowFix(location, name, width, height)
{
	var gWinSize;
	gWinSize = "width=" + width + ",height=" + height;
	
	//window.resizeTo(600,gWinheight);
	window.open(location, name, "status=yes, toolbar=no, menubar=no, location=no,resizable=no,"+gWinSize,true);
}

function openWindowFull(location, name, width, height)
{
	var gWinSize;
	gWinSize = "width=" + width + ",height=" + height;
	
	//window.resizeTo(600,gWinheight);
	window.open(location, name, "status=yes, toolbar=yes, menubar=yes, location=yes,resizable=yes,"+gWinSize,true);
}

/********
Flash Tag
********/
function FlashObject(swf, width, height, bgcolor, flashvars)
{
    var strFlashTag = new String();
    
    if (navigator.appName.indexOf("Microsoft") != -1)
    {
        strFlashTag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
        strFlashTag += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=version=8,0,0,0" ';
		strFlashTag += 'width="' + width + '" height="' + height + '">';
        strFlashTag += '<param name="movie" value="' + swf + '"/>';
		if(flashvars != null) {strFlashTag += '<param name="flashvars" value="' + flashvars + '"/>'};
        strFlashTag += '<param name="quality" value="best"/>';
        strFlashTag += '<param name="bgcolor" value="' + bgcolor + '"/>';
		strFlashTag += '<param name="menu" value="false"/>';
		strFlashTag += '<param name="salign" value="LT"/>';
		strFlashTag += '<param name="scale" value="noscale"/>';
		strFlashTag += '<param name="wmode" value="window"/>';
		strFlashTag += '<param name="allowScriptAccess" value="sameDomain"/>';
        strFlashTag += '</object>';
    }
    else
    {
        strFlashTag += '<embed src="' + swf + '" ';
        strFlashTag += 'quality="best" ';
        strFlashTag += 'bgcolor="' + bgcolor + '" ';
        strFlashTag += 'width="' + width + '" ';
        strFlashTag += 'height="' + height + '" ';
		strFlashTag += 'menu="false" ';
		strFlashTag += 'scale="noscale" ';
		strFlashTag += 'salign="LT" ';
		strFlashTag += 'wmode="window" ';
		strFlashTag += 'allowScriptAccess="sameDomain" ';
        if(flashvars != null) {strFlashTag += 'flashvars="' + flashvars + '" '};
        strFlashTag += 'type="application/x-shockwave-flash" ';
        strFlashTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
        strFlashTag += '</embed>';
    }

	document.write(strFlashTag);
}

function IsIE()
{
	return (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
}
