function getWindowHeight() {
	var windowHeight=0;
	if (typeof(window.innerHeight)=='number') {
			windowHeight = window.innerHeight;
		} else {
			if (document.documentElement && document.documentElement.clientHeight) {
				windowHeight = document.documentElement.clientHeight;
			} else {
				if (document.body&&document.body.clientHeight) {
					windowHeight=document.body.clientHeight;
				}
		}
	}
	return windowHeight;
}

function test(str){
	alert("str");	
}
function setFlashHeight(h){
	wH = getWindowHeight();
	if (h > wH){
		document.getElementById("flash_div").style.height = h + "px";
		document.getElementById("core").style.height = h + "px";
//		document.getElementById("core").setAttribute('height', h);
	} else {
		document.getElementById("flash_div").style.height = "100%";
		document.getElementById("core").style.height = "100%";
//		document.getElementById("core").setAttribute('height', '100%');
	}
}

function getHash(){
	var h = "";
	if(parent.location)
		if(parent.document.location.hash){
			h = parent.document.location.hash;
			h = h.substring(h.indexOf("#")+1, h.length);
		}
	return h
}

function setHash(strHash){
	if(parent.location) {
		parent.document.location.hash=strHash;
	}
}

function writeFlash(StrFileName, intHeight, intWidth, strWmode, strArgs, strName, strVersion){
    document.write ("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'");
    document.write (" codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=" + strVersion + "' id='" + strName + "'" );
    document.write (" width='" + intWidth + "' height='" + intHeight + "'>");
    document.write ("<param name='menu' value='false'>");
    document.write ("<param name='allowScriptAccess' value='sameDomain'>");
    document.write ("<param name='wmode' value='" + strWmode + "'>");
    document.write ("<param name='align' value='left'>" );
    document.write ("<param name='flashVars' value='" + strArgs + "'>" );
    document.write ("<param name='movie' value='" + StrFileName + "'>" );
    document.write ("<param name='quality' value='high'>" );
    document.write ("<embed src='" + StrFileName + "' allowScriptAccess='sameDomain' flashVars='" + strArgs + "' align='left' menu='false' wmode='" + strWmode + "' quality='high'" );
    document.write (" name='" + strName + "' pluginspage='http://www.macromedia.com/go/getflashplayer'" );
    document.write (" type='application/x-shockwave-flash' width='" + intWidth + "' height='" + intHeight + "'></embed></object>");
}

function popupPage (url, w, h) {
	if (!w) w = 500;
	if (!h) h = 400;
	
	win = window.open(url,"pdpopup","toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + w + ",height=" + h);
	if (!win) return;
	
	win.focus();
}