// write document contents
function documentwrite(src) {
    document.write(src);
}
// Éú³ÉFLASH
function flashDraw(objName, swfUrl, width, Height, bgColor, transparent, flashvars) {
    if (transparent == null) transparent = false;
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
    document.write(' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10.1.102.64"');
    document.write(' width=' + width + ' height="' + Height + '" name="' + objName + '" id="' + objName + '" align="middle">');
    document.write('<param name="allowScriptAccess" value="always" />');
    document.write('<param name="movie" value="' + swfUrl + '" />');
    document.write('<param name="quality" value="high" />');
    if (transparent) {
        document.write('<param name="wmode" value="transparent" />');
    }
    if (flashvars != null) {
        document.write('<param name="flashvars" value="' + flashvars + '" />');
    }
    document.write('<embed src="' + swfUrl + '" width="' + width + '" height="' + Height + '" quality=\"high\" wmode=\"transparent\"');
    document.write('pluginspage=\"http://www.macromedia.com/go/getflashplayer\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\"></embed>');
    document.write('<param name="bgcolor" value="#' + bgColor + '" />');
    document.write('</object>');
}
function flvplayerDraw(objName, incPath, flvUrl, width, height) {
    document.write('<object id="' + objName + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="' + objName + '" width="' + width + '" height="' + height + '">');
    document.write('<param name="movie" value="' + incPath + '/player.swf" />');
    document.write('<param name="allowfullscreen" value="true" />');
    document.write('<param name="allowscriptaccess" value="always" />');
    document.write('<param name="flashvars" value="file=' + flvUrl + '&repeat=always&stretching=fill&autostart=true" />');
    document.write('<embed type="application/x-shockwave-flash" src="' + incPath + '/player.swf" width="' + width + '"  height="' + height + '" allowscriptaccess="always"  allowfullscreen="true" flashvars="file=' + flvUrl + 'repeat=always&stretching=fill&autostart=true" />');
    document.write('</object>');
}
function OpenPopup(url, name, width, height, paddingWidth, paddingHeight, align, valign) {
    var body = (document.compatMode && document.compatMode.toLowerCase() == "css1compat") ? document.documentElement : document.body;
    var iTop = paddingHeight;
    switch (valign.toLowerCase()) {
        case "bottom":
            iTop = (window.screen.availHeight - paddingHeight - height) - 35;
            break;
        case "center":
            iTop = (window.screen.availHeight - paddingHeight - height) / 2;
            break;
        default:
            iTop = paddingHeight;
            break;
    }
    var iLeft = paddingWidth;
    switch (align.toLowerCase()) {
        case "right":
            iLeft = (window.screen.availWidth - paddingWidth - height) - 10;
            break;
        case "center":
            iLeft = ((window.screen.availWidth - paddingWidth - height) / 2) - 30;
            break;
        default:
            iLeft = paddingWidth;
            break;
    }
    window.open(url, name,
        "width=" + width + ", height=" + height + ", left=" + iLeft + ", top=" + iTop + ", toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no");
}

function SessionTimeOutVerify(windowReturnValue) {
    switch (windowReturnValue) {
        case "ADMINSESSIONTIMEOUT":
            location = "/admin/login.aspx";
            break;
        case "SESSIONTIMEOUT":
            location = "/";
            break;
        default:
            break;
    }
}
