function objectTag(id, filepath, width, height)
{
	var objHTML = "";

	objHTML += "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='" + width + "' height='" + height + "' id='" + id + "' align='middle'>";
	objHTML += "<param name='allowScriptAccess' value='always' />";
	objHTML += "<param name='movie' value='" + filepath + "' />";
	objHTML += "<param name='quality' value='high' />";
	objHTML += "<param name='wmode' value='transparent' />";
	objHTML += "<param name='salign' value='t' />";
	objHTML += "<embed src='" + filepath + "' quality='high' bgcolor='#ffffff' width='" + width + "' height='" + height + "' name='" + id + "' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";
	objHTML += "</object>";

	document.write(objHTML);
}

function musicPlayerTag(id, filepath, width, height)
{
	var objHTML = "";

	objHTML += "<object Name='"+id+"' id='"+id+"' width='"+width+"' height='"+height+"' classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95'>";
	objHTML += "<param NAME='Filename' VALUE='" + filepath + "'>";
    objHTML += "<param NAME='AutoStart' VALUE='1'>";
    objHTML += "<param NAME='PlayCount' VALUE='1'>";
	objHTML += "<PARAM NAME='Volume' VALUE='0'>";
    objHTML += "<param NAME='ShowDisplay' VALUE='0'>";
	objHTML += "<embed type='application/x-mplayer2' src='" + filepath + "' width='"+width+"' height='"+height+"' id='"+id+"' Name='"+id+"' ";
	objHTML += "AutoSize='1' PlayCount='1' ShowDisplay='0' ";
	objHTML += "pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/'>";
    objHTML += "</object>";

	document.write(objHTML);
}

function chgHeight(k){
	if(k=="1") document.getElementById("mainSwf").height=550;
	else if(k=="2") document.getElementById("mainSwf").height=550;
}

var topMenuInterval;
function chgSubMenuHeight(k){
	clearTimeout(topMenuInterval);
	if(k=="1") document.getElementById("topMenu").height=175;
	else if(k=="2") topMenuInterval = setTimeout(function(){document.getElementById("topMenu").height=155;},500);
}

function doMainLogin(user_name, ssn1, ssn2, user_pw) {
	var frm = document.loginFrm;
	frm.user_name.value = user_name;
	frm.user_pw.value = user_pw;
	frm.authData.value = btActX_Seal(ssn1+ssn2);
	frm.submit();
}

//popup
function popWindowCenter(pop,width,height,scroll) {
	var url = pop;  
	var wd = width;
	var he = height;
	var top = (window.screen.height-he)/2
	var left = (window.screen.width-wd)/2
	window.open(url,"","toolbar=0,menubar=0,scrollbars=" + scroll + ",resizable=no,top="+top+",left="+left+",width=" + wd +",height=" + he + ";")
}
function openWin(u, w, h) { 
            var l = (screen.width - w) / 2; 
            var t = (screen.height - h) / 2; 
            var s = 'width=' + w + ', height=' + h + ', top=' + t + ', left=' + l; 
            s += ', toolbar=no, scrollbars=no, menubar=no, location=no, resizable=no'; 
            open(u, 'oWin', s); 
} 