﻿function $(str) {
    return document.getElementById(str);
}

function getAbsLeft(e) { var l = e.offsetLeft; while (e = e.offsetParent) l += e.offsetLeft; return l; }
function getAbsTop(e) { var t = e.offsetTop; while (e = e.offsetParent) t += e.offsetTop; return t; }

function ShowFlash(ur, w, h, pras) {
    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="' + w + '" height="' + h + '"> ');
    document.write('<param name="movie" value="' + ur + '">');
    document.write('<param name="quality" value="high"> ');
    document.write('<param name="allowScriptAccess" value="sameDomain">');
    document.write('<param name="wmode" value="opaque"> ');
    document.write('<param name="menu" value="false"> ');
    document.write('<param name="scale" value="exactfit"> ');
    document.write('<embed src="' + ur + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + w + '" height="' + h + '"></embed> ');
    if (pras) document.write(pras);
    document.write('</object> ');
}

function GetQuery(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if (r != null)
        return unescape(r[2]);
    return "";
}

function GetPraValue(sourceStr, praName, spChar) {
    var result = "";
    if (spChar == null || spChar == "") spChar = ",";
    var arr = sourceStr.split(spChar);
    var i, arrPra;
    for (i = 0; i < arr.length; i++) {
        arrPra = arr[i].split(":");
        if (arrPra[0] == praName) {
            result = arrPra[1];
            break;
        }
    }
    return result;
}

 