﻿//window.opener = null;
var tiptimer, nohref = 'href="javascript:void(0);"', SngLine1 = '#sng#', SngLine2 = '$sng$', sngkey = ['#sng#','$sng$'];

function SngStat() {
  document.write('');
}

function SngSoID(id) {
  if (document.getElementById) { return document.getElementById(id); }
  else if (document.all) { return document.all[id]; }
  else if (document.layers) { return document.layers[id]; }
  else { return false; }
}

function SngSoStyle(id) {
    if (!SngSoID(id)) { return false; }
    return SngSoID(id).style;
}

function SngSetCss(id,key) {
    if (!SngSoID(id)) { return false; }
    SngSoID(id).className = key;
}

function SngSetCssObj(id, key) {
    if (!id) { return false; }
    id.className = key;
}

function SngSoFrameID(ifrname, id) {
    if (!parent.frames[ifrname].SngSoID(id)) { return false; }
    return parent.frames[ifrname].SngSoID(id);
}

function SngAjax() {
  var obj;
  try { obj = new XMLHttpRequest(); }
  catch (e) {
      var objList = ["MSXML2.XMLHTTP", "MSXML.XMLHTTP", "Microsoft.XMLHTTP"];
      obj = false;
      for (var i = 0; i < objList.length; i++) {
          try {
              obj = new ActiveXObject(objList[i]);
              break;
          }
          catch (e) { }
      }
  }
  return obj;
}

function SngHtml(id) { return document.write(id); }

function SngChkStr(key) {
    if (SngCheckNull(key)) { return ""; }
    var rekey = key;
    rekey = rekey.replace(/</g, '&#60;');
    rekey = rekey.replace(/>/g, '&#62;');
    rekey = rekey.replace(/\(/g, '&#40;');
    rekey = rekey.replace(/\)/g, '&#41;');
    rekey = rekey.replace(/\[/g, '&#91;');
    rekey = rekey.replace(/\]/g, '&#93;');
    rekey = rekey.replace(/{/g, '&#123;');
    rekey = rekey.replace(/}/g, '&#125;');
    rekey = rekey.replace(/%/g, '&#37;');
    rekey = rekey.replace(/\'/g, '&#39;');
    rekey = rekey.replace(/\*/g, '&#42;');
    rekey = rekey.replace(/\"/g, '&#34;');
    rekey = rekey.replace(/,/g, '&#44;');
    rekey = rekey.replace(/\//g, '&#47;');
    rekey = rekey.replace(/:/g, '&#58;');
    rekey = rekey.replace(/=/g, '&#61;');
    rekey = rekey.replace(/\?/g, '&#63;');
    rekey = rekey.replace(/\\/g, '&#92;');
    rekey = rekey.replace(/\^/g, '&#94;');
    rekey = rekey.replace(/_/g, '&#95;');
    rekey = rekey.replace(/`/g, '&#96;');
    rekey = rekey.replace(/\|/g, '&#124;');
    rekey = rekey.replace(/textarea/g, '&#116;extarea');
    rekey = rekey.replace(/&nbsp;/g, '&#38;nbsp;');
    rekey = rekey.replace(/&apos;/g, '&#38;apos;');
    rekey = rekey.replace(/&quot;/g, '&#38;quot;');
    rekey = encodeURIComponent(rekey);
    return rekey;
}

function SngChkStrToKong(key) {
    if (SngCheckNull(key)) { return ""; }
    var rekey = key;
    rekey = rekey.replace(/</g, '');
    rekey = rekey.replace(/>/g, '');
    rekey = rekey.replace(/\(/g, '');
    rekey = rekey.replace(/\)/g, '');
    rekey = rekey.replace(/\[/g, '');
    rekey = rekey.replace(/\]/g, '');
    rekey = rekey.replace(/{/g, '');
    rekey = rekey.replace(/}/g, '');
    rekey = rekey.replace(/%/g, '');
    rekey = rekey.replace(/\'/g, '');
    rekey = rekey.replace(/\*/g, '');
    rekey = rekey.replace(/\"/g, '');
    rekey = rekey.replace(/,/g, '');
    rekey = rekey.replace(/\//g, '');
    rekey = rekey.replace(/:/g, '');
    rekey = rekey.replace(/=/g, '');
    rekey = rekey.replace(/\?/g, '');
    rekey = rekey.replace(/\\/g, '');
    rekey = rekey.replace(/\^/g, '');
    rekey = rekey.replace(/_/g, '');
    rekey = rekey.replace(/`/g, '');
    rekey = rekey.replace(/\|/g, '');
    rekey = rekey.replace('&#60;', '');
    rekey = rekey.replace('&#62;', '');
    rekey = rekey.replace('&#40;', '');
    rekey = rekey.replace('&#41;', '');
    rekey = rekey.replace('&#91;', '');
    rekey = rekey.replace('&#93;', '');
    rekey = rekey.replace('&#123;', '');
    rekey = rekey.replace('&#125;', '');
    rekey = rekey.replace('&#37;', '');
    rekey = rekey.replace('&#39;', '');
    rekey = rekey.replace('&#42;', '');
    rekey = rekey.replace('&#34;', '');
    rekey = rekey.replace('&#44;', '');
    rekey = rekey.replace('&#47;', '');
    rekey = rekey.replace('&#58;', '');
    rekey = rekey.replace('&#61;', '');
    rekey = rekey.replace('&#63;', '');
    rekey = rekey.replace('&#92;', '');
    rekey = rekey.replace('&#94;', '');
    rekey = rekey.replace('&#95;', '');
    rekey = rekey.replace('&#96;', '');
    rekey = rekey.replace('&#124;', '');
    return rekey;
}

function SngUnChkStr(key) {
    if (SngCheckNull(key)) { return ""; }
    var rekey = key;
    rekey = unescape(rekey);
    return rekey;
}

function SngOutTrans(key) {
    if (SngCheckNull(key)) { return ""; }
    var rekey = key;
    rekey = rekey.replace('&amp;', '&');
    return rekey;
}

function SngAddFav(alt, url) {
    if (document.all) { window.external.AddFavorite(url, alt); }
    else if (window.sidebar) { window.sidebar.addPanel(alt, url, ''); }
    else { return false; }
}

function SngClose(id, key) {
    if (!SngSoID(id)) { return; }
    if (key == 1) { SngSoStyle(id).display = 'block'; }
    else { SngSoStyle(id).display = 'none'; }
}

function SngDisable(id, key) {
    if (!SngSoID(id)) { return; }
    if (key == 1) { SngSoID(id).disabled = true; }
    else { SngSoID(id).disabled = false; }
}

function SngChecked(id, key) {
    if (!SngSoID(id)) { return; }
    if (key == 1) { SngSoID(id).checked = true; }
    else { SngSoID(id).checked = false; }
}

function SngInHtml(id, key) {
    if (!SngSoID(id)) { return; }
    SngSoID(id).innerHTML = key;
}

function SngInTextKey(id) {
    if (!SngSoID(id)) { return ""; }
    return SngTrim(SngSoID(id).innerHTML);
}

function SngInText(id) {
    if (!SngSoID(id)) { return ""; }
    return SngChkStr(SngTrim(SngSoID(id).innerHTML));
}

function SngInPic(id, key) {
    if (!SngSoID(id)) { return; }
    SngSoID(id).src = key;
}

function SngInFrameHtml(frameid, id, key) {
    SngSoFrameID(frameid, id).innerHTML = unescape(key);
}

function SngTrimL(key) { return key.replace(/^\s*/, ''); }
function SngTrimR(key) { return key.replace(/\s*$/, ''); }
function SngTrim(key) { return key.replace(/(^\s*)|(\s*$)/g, ''); }

function SngIsInt(key) { return /^\d+$/.test(key); }

function SngIsIntArea(key, KMin, KMax) {
    var tk = false;
    if (!SngIsInt(key)) { return tk; }
    if ((parseInt(key) >= parseInt(KMin)) && (parseInt(key) <= parseInt(KMax))) { tk = true; }
    return tk;
}

function SngReplace(key, key1, key2) { return key.replace(key1, key2); }

function SngInpValue(formid, inpname) { return SngChkStr(SngTrim(eval('SngSoID(formid).' + inpname).value)); }

function SngInpIDValue(inpid) {
    if (!SngSoID(inpid)) { return ""; }
    return SngChkStr(SngTrim(SngSoID(inpid).value));
}

function SngInpIDKey(inpid) {
    if (!SngSoID(inpid)) { return ""; }
    return SngTrim(SngSoID(inpid).value);
}

function SngInpSet(formid, inpname, value) { eval('SngSoID(formid).' + inpname).value = value; }

function SngInpIDSet(inpid, value) {
    if (!SngSoID(inpid)) { return; }
    SngSoID(inpid).value = value;
}

function SngInpFocus(formid, inpname) { eval('SngSoID(formid).' + inpname).focus(); }

function SngInpIDFocus(inpid) {
    if (!SngSoID(inpid)) { return; }
    if (SngSoID(inpid).display == 'block') { SngSoID(inpid).focus(); }
}

function SngGetRadioValue(name) {
    var obj = document.getElementsByName(name);
    if(obj != null){
        for(var ii = 0; ii < obj.length; ii++){
            if(obj[ii].checked) { return obj[ii].value; }
        }
    }
    return "";
}

function SngGetSelectValue(id) {
    if (!SngSoID(id)) { return; }
    return SngSoID(id).options[SngSoID(id).selectedIndex].value;
}

function SngEvent() {
    if (document.all) { return window.event; }
    else {
        var func = getEvent.caller;  
        while (func != null) {
            var arg0 = func.arguments[0];
            if (arg0) {
                if ((arg0.constructor == Event || arg0.constructor == MouseEvent) || (typeof (arg0) == 'object' && arg0.preventDefault && arg0.stopPropagation)) { return arg0; }
            }
            func = func.caller;
        }
        return null;
    }
}

function SngCheckNull(key) {
    var rekey = false;
    if (key == '' || key == null || key == 'undefined') { rekey = true; }
    return rekey;
}

function SngArrGet(arr, num) {
    var key = '';
    if (array.length >= num) { key = array[num]; }
    return key;
}

function SngCookieGet(name) {
    var key = '';
    var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
    if (arr != null) { key = unescape(arr[2]); }
    return key;
}

function SngCheckLens(key) {
    if (key == '') { return 0; }
    var rekey = 0;
    for (var ii = 0; ii < key.length; ii++) {
        rekey += 1;
        if (key.charCodeAt(ii) > 255) { rekey += 1; }
    }
    return rekey;
}

function SngMaxLen(key, lens, times, infoid, inpid) {
    var rekey = true, teplens = parseInt(SngCheckLens(unescape(key)));
    var tepmax = parseInt(lens);
    if (teplens > tepmax) {
        var morelen = teplens - tepmax;
        var tepkey = KeyConfig.Info[1];
        var chinanum = morelen / 2;
        var rechinanum = parseInt(chinanum);
        if (rechinanum < chinanum) { chinanum = rechinanum + 1; }
        tepkey = SngReplace(tepkey, '{1}', SngReplace(SngUnChkStr(SngInText(infoid)), ':', ''));
        tepkey = SngReplace(tepkey, '{2}', lens);
        tepkey = SngReplace(tepkey, '{3}', morelen);
        tepkey = SngReplace(tepkey, '{4}', chinanum);
        SngToolTip(2, 0, '', times, KeyConfig.Err[0], tepkey);
        SngInpIDFocus(inpid);
        rekey = false;
    }
    return rekey;
}

function SngOpen(url) { if (url != '' && url != 'undefined') { window.open(url, '_blank'); } }

function SngLocalOpen(url, num) {
    var tepurl = false;
    if (url != '' && url != 'undefined') { tepurl = true; }    
    if (num == '') { num = 0; }
    if (num == 0) { if (tepurl) { window.location.href = url; } }
    else if (num == 1) { if (tepurl) { top.window.location.href = url; } }
    else if (num == 2) { if (tepurl) { parent.window.location.href = url; } }
    else if (num == 3) { if (tepurl) { parent.parent.window.location.href = url; } }
    else if (num == 4) { window.location.reload(); }
    else if (num == 5) { top.window.location.reload(); }
    else if (num == 6) { parent.window.location.reload(); }
    else if (num == 7) { parent.parent.window.location.reload(); }
}

function SngTimeUrl(url, outtime, num) {
   setTimeout("SngLocalOpen('" + url + "', '" + num + "')", outtime * 1000);
}

function SngHost(num) {
    var rekey = '';
    if (num == 0) { rekey = window.location.host.match(/[^.]+\.[^.]+$/)[0]; }
    else if (num == 1) { rekey = top.window.location.host.match(/[^.]+\.[^.]+$/)[0]; }
    return rekey;
}

function SngToolTipBuild() {
    var rekey = '';
    rekey += '<div id="SngTipMain" onmouseover="SngToolTipNoOut();">';
    rekey += '<div class="SngTM1"><div id="SngTipTitle" class="SngTM1111"><ul><li class="SngTM11">&nbsp;</li><li class="SngTM12">&nbsp;</li><li id="SngTipName" class="SngTM13">&nbsp;</li></ul></div><div class="SngTM1112"><ul><li id="SngTipWin" class="SngTM14"><img src="/pub/tip/t5.jpg" onmouseover="this.src=\'/pub/tip/t6.jpg\'" onmouseout="this.src=\'/pub/tip/t5.jpg\'" title="' + KeyConfig.Sys[2] + '" onclick="SngTipWinMini();"></li><li class="SngTM15">&nbsp;</li><li class="SngTM14"><img src="/pub/tip/t9.jpg" onmouseover="this.src=\'/pub/tip/t10.jpg\'" onmouseout="this.src=\'/pub/tip/t9.jpg\'" title="' + KeyConfig.Sys[0] + '" onclick="SngClose(\'SngTipBox\', 0);"></li><li class="SngTM16">&nbsp;</li><li class="SngTM17">&nbsp;</li></ul></div>';
    rekey += '<div id="SngTipInfo" class="SngTM4">';
    rekey += '<div class="SngTM2"><div class="SngTM21"><div class="SngTM211"><img id="SngTipPic" src="/pub/tip/i1.gif"></div><div id="SngTipNote" class="SngTM212">&nbsp;</div></div><div class="SngTM22"><div id="SngTipAsk" class="SngTM221">&nbsp;</div></div><div class="SngTM23">&nbsp;</div></div>';
    rekey += '<div class="SngTM3">&nbsp;</div>';
    rekey += '</div>';
    rekey += '</div>';
    SngInHtml('SngTipBox', rekey);
    var teptop = ($(document.body).height() - 100) / 2;
    var tepleft = (document.body.clientWidth - 360) / 2;
    SngSoStyle('SngTipBox').top = teptop + 'px';
    SngSoStyle('SngTipBox').left = tepleft + 'px';
}

function SngToolTip(ico, isask, askkey, outtime, tipname, tipnote) {
    if (!SngSoID('SngTipMain')) {
        SngToolTipBuild();
        $().ready(function() { $('#SngTipBox').jqDrag(); });
    }
    SngInHtml('SngTipName', SngUnChkStr(tipname));
    SngInPic('SngTipPic', '/pub/tip/i' + ico + '.gif');
    SngInHtml('SngTipNote', SngUnChkStr(tipnote));
    SngTipWinMax();
    SngClose('SngTipBox', 1);
    clearTimeout(tiptimer);
    if (outtime > 0) { tiptimer = setTimeout("SngClose('SngTipBox', 0)", outtime * 1000); }
}

function SngTipWinMini() {
    SngInHtml('SngTipWin', '<img src="/pub/tip/t7.jpg" onmouseover="this.src=\'/pub/tip/t8.jpg\'" onmouseout="this.src=\'/pub/tip/t7.jpg\'" title="' + KeyConfig.Sys[2] + '" onclick="SngTipWinMax();">');
    SngClose('SngTipInfo', 0);
}

function SngTipWinMax() {
    SngInHtml('SngTipWin', '<img src="/pub/tip/t5.jpg" onmouseover="this.src=\'/pub/tip/t6.jpg\'" onmouseout="this.src=\'/pub/tip/t5.jpg\'" title="' + KeyConfig.Sys[1] + '" onclick="SngTipWinMini();">');
    SngClose('SngTipInfo', 1);
}

function SngToolTipNoOut() {
    //if (tiptimer) { clearTimeout(tiptimer); }
}

function SngSelCre(keyid) {
  var tepkey = document.createElement('select');
  tepkey.id = keyid;
  document.body.appendChild(tepkey);
}

function SngSelAddTopOp(keyid, optext, opvalue, opcss) {
    var tepobj = new Option(optext, opvalue);
    if (opcss != '') { tepobj.className = opcss; }
    SngSoID(keyid).options.add(tepobj);
    tepobj = null;
}

function SngSelAddOp(keyid, optext, opvalue, opseleted, opcss, opcssseleted) {
    var tepobj = new Option(optext, opvalue);
    if (opcss != '') { tepobj.className = opcss; }
    if (opseleted == 1) {
        tepobj.selected = 'selected';
        tepobj.className = opcssseleted;
    }
    SngSoID(keyid).options.add(tepobj);
    tepobj = null;
}

function SngSelDelAll(keyid) {
    SngSoID(keyid).options.length = 0;
}

function SngSelDelOne(keyid) {
  SngSoID(keyid).options.remove(SngSoID(keyid).selectedIndex);
}

function SngSelGet(keyid, num) {
  if (!SngSoID(keyid)) { return ''; }
  var index = SngSoID(keyid).selectedIndex, rekey = '';
  try {
     if(num == 0) { rekey = SngSoID(keyid).options[index].value; }
     else if(num == 1) { rekey = SngSoID(keyid).options[index].text; }
  }
  catch(e) { }
  return rekey;
}

function SngSelModiTopOp(keyid, optext, opvalue, opcss) {
    var index = SngSoID(keyid).selectedIndex;
    var tepobj = new Option(optext, opvalue);
    if (opcss != '') { tepobj.className = opcss; }
    SngSoID(keyid).options[index] = tepobj;
    tepobj = null;
}

function SngSelModiOp(keyid, optext, opvalue, opcss) {
    var index = SngSoID(keyid).selectedIndex;
    var tepobj = new Option(optext, opvalue);
    if (opcss != '') { tepobj.className = opcss; }
    SngSoID(keyid).options[index] = tepobj;
    tepobj = null;
}

function SngGetRadio(formid,nameid) {
    var obj = eval('SngSoID("' + formid + '").' + nameid);
    if (!obj) { return; }
    var ralen = obj.length, tepone = '';
    if (ralen > 1) {
        for (var ii = 0; ii < obj.length; ii++) {
            if (obj[ii].checked == true) {
                tepone = obj[ii].value;
                break;
            }
        }
    }
    else {
        if (obj.checked == true) { allnid = obj.value; }
    }
    return tepone;
}

function SngGetCheckbox(keyid) {
    var rekey = '';
    if (!SngSoID(keyid)) { return rekey; }
    if (SngSoID(keyid).checked == true) { rekey = 'on'; }
    return rekey;
}

function SngGetNid(formid,nameid) {
    var obj = eval('SngSoID("' + formid + '").' + nameid);
    if (!obj) { return; }
    var ralen = obj.length, allnid = '';
    if (ralen > 1) {
        for (var ii = 0; ii < obj.length; ii++) {
            if (obj[ii].checked == true) {
                if (allnid != '') { allnid += ',' + obj[ii].value; }
                else { allnid = obj[ii].value; }
            }
        }
    }
    else {
        if (obj.checked == true) { allnid = obj.value; }
    }
    return allnid;
}

function SngRowEffect(id, idkey, cssa, cssb) {
    var obj = SngSoID(id).getElementsByTagName(idkey), tepcss = '', tepvalue = '';
    if (!obj) { return; }
    for (var ii = 0; ii < obj.length; ii++) {
        obj[ii].onclick = function() {
            tepcss = this.className;
            tepvalue = this.sngcss;
            if (tepcss == cssa && tepvalue == cssa) { this.className = cssb; this.sngcss = cssb; }
            else if (tepcss == cssb && tepvalue == cssb) { this.className = cssa; this.sngcss = cssa; }
            else { this.className = cssb; this.sngcss = cssb; }
        }
        obj[ii].onmouseover = function() { if (this.sngcss != cssb) { this.className = cssb; } }
        obj[ii].onmouseout = function() { if (this.sngcss != cssb) { this.className = cssa; } }
    }
}

function SngTranslate(actnum, resid, aimid, reslang, aimlang, keyrun) {
    var reskey = '',rekey = '';
    if (actnum == 1) { reskey = SngInpIDKey(resid); }
    else { reskey = SngInTextKey(resid); }
    if (reskey == '') { return; }
    if (actnum == 1) { SngInpIDSet(aimid, KeyConfig.Run[7]); }
    else { SngInHtml(aimid, KeyConfig.Run[7]); }
    if (reslang == 'chn' || reslang == 'cht') { reslang = 'zh'; }
    if (aimlang == 'chn') { aimlang = 'zh-CN'; }
    if (aimlang == 'cht') { aimlang = 'zh-TW'; }
    SngInPic('SngTipPic', '/pub/tip/i4.gif');
    SngInHtml('SngTipName', KeyConfig.Run[7]);
    google.language.translate(reskey, reslang, aimlang, function(result) {
        if (!result.error) {
            rekey = SngOutTrans(result.translation);
            if (keyrun != '') {
                var runlist = keyrun.split(sngkey[0]);
                for (var ii = 0; ii < runlist.length; ii++) {
                    eval(runlist[ii]);
                }
            }            
            if (actnum == 1) { SngInpIDSet(aimid, rekey); }
            else { SngInHtml(aimid, rekey); }
            SngInPic('SngTipPic', '/pub/tip/i3.gif');
            SngInHtml('SngTipName', KeyConfig.Succ[10]);
        }
        else {
            if (actnum == 1) { SngInpIDSet(aimid, ''); }
            else { SngInHtml(aimid, ''); }
            SngInPic('SngTipPic', '/pub/tip/i2.gif');
            SngInHtml('SngTipName', KeyConfig.Err[12]);
        }
    });
}

function SngEnLetter(actnum, resid, aimid, reslang, aimlang) {
    SngTranslate(actnum, resid, aimid, reslang, aimlang, 'rekey = SngFullLetter(rekey)');
}

function SngChnPinYin(actnum, resid, aimid) {
    var reskey = '', rekey = '';
    if (actnum == 1) { reskey = SngInpIDKey(resid); }
    else { reskey = SngInTextKey(resid); }
    if (reskey == '') { return; }
    if (actnum == 1) { SngInpIDSet(aimid, KeyConfig.Run[9]); }
    else { SngInHtml(aimid, KeyConfig.Run[9]); }
    SngInPic('SngTipPic', '/pub/tip/i4.gif');
    SngInHtml('SngTipName', KeyConfig.Run[9]);
    var ajaxparameter = 'key=' + reskey;
    SngToolTip(4, 0, '', 0, KeyConfig.Run[9], KeyConfig.Info[0]);
    $.ajax({
        type: "POST",
        url: "/pubcom/chnpinyin.aspx",
        timeout: 20000,
        error: function() {
            SngToolTip(2, 0, '', 0, KeyConfig.Err[14], KeyConfig.Err[14]);
            if (actnum == 1) { SngInpIDSet(aimid, ''); }
            else { SngInHtml(aimid, ''); }
        },
        data: ajaxparameter,
        success: function(msg) {
            if (msg == 'false') {
                if (actnum == 1) { SngInpIDSet(aimid, ''); }
                else { SngInHtml(aimid, ''); }
                SngToolTip(3, 0, '', 3, KeyConfig.Err[14], KeyConfig.Err[14]);
                return;
            }
            else {
                msg = SngFullLetter(msg);
                if (actnum == 1) { SngInpIDSet(aimid, msg); }
                else { SngInHtml(aimid, msg); }
                SngToolTip(3, 0, '', 2, KeyConfig.Succ[12], KeyConfig.Succ[12]);
                return;
            }
        }
    });
}

function SngFullLetter(key) {
    if (SngCheckNull(key)) { return ""; }
    var rekey = key;
    rekey = SngChkStrToKong(rekey);
    rekey = rekey.replace(/ */g, '');
    rekey = rekey.replace(/-/g, '');
    rekey = rekey.replace(/_/g, '');
    rekey = rekey.toLowerCase();
    return rekey;
}

function SngTabMenu(kmenu, kname, knum, kid, kcssa, kcssb) {
    for (var ii = 1; ii <= knum; ii++) {
        SngClose(kname + ii, 0);
        SngSetCss(kmenu + ii, kcssb);
    }
    SngClose(kname + kid, 1);
    SngSetCss(kmenu + kid, kcssa);
}

function SngSkin(id, num, key) { SngSoID(id).href = '/skin/' + num + '/' + key + '.css'; }

function SngPageCss(key) {
    var tepcss = SngGetUrlValue('css');
    if (SngIsIntArea(tepcss, 1, 6)) { SngSkin('SngSkin', tepcss, key); }
}

function SngGetUrlValue(name) {
  var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)","i"),rekey = '';
  var re = window.location.search.substr(1).match(reg);
  if (re != null) { rekey =  unescape(re[2]); }
  return rekey;
}

function SngTarget() {
  if (!document.getElementsByTagName) { return; }
  var tepa = document.getElementsByTagName('a'),tepb;
  for (var ii = 0; ii < tepa.length; ii++) {
      tepb = tepa[ii];
      if (tepb.getAttribute('href') && tepb.getAttribute('rel') == 'new') { tepb.target = '_blank'; }
    }
}

window.onload = SngTarget;
document.oncontextmenu = function(e) { return false; }