// JavaScript Document


function Over(obj) {
    obj.style.background = "#FBAF5C";
}

function Out(obj) {
    obj.style.background = "#999999";
}


function LinkSelected(obj) {
    if (obj.options[obj.selectedIndex].value.length > 0) {
        window.open(obj.options[obj.selectedIndex].value);
    }
}

function setfoc(id, objId, fttltxtId, picArr, txtArr, imgLinkId, tmb) {
    var focpic = document.getElementById(objId);
    focpic.src = picArr[id];
    var fttltxt = document.getElementById(fttltxtId);
    fttltxt.innerHTML = txtArr[id];
    document.getElementById(imgLinkId).href = picArr[id];
    for (i = 0; i < picArr.length; i++) {

        document.getElementById(tmb + i).className = "thubpic";
    };
    document.getElementById(tmb + id).className = "thubpiccur";
    focpic.style.visibility = "hidden";
    if (focpic.style.visibility == "visible") {
        focpic.style.visibility = "hidden";
    }
    else {
        focpic.style.visibility = "visible";
    }
}

function EncodeURI(link, uri) {
    link.href = encodeURI(uri);
}

function SelectSx(name) {
    var sx = document.getElementById("sx");
    sx.src = name + ".html";
}

//带数据的flash代码函数
function lg_flash_asp(focus_width, focus_height, text_height)//依此是 flash的宽，高，文字高
{
    var swf_height = focus_height + text_height;
    var flashurl = "pixviewer.swf";
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + focus_width + '" height="' + swf_height + '">');
    document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="' + flashurl + '"><param name="quality" value="high"><param name="bgcolor" value="#FFFFFF">');
    document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
    document.write('<param name="FlashVars" value="pics=' + pics + '&links=' + links + '&texts=' + texts + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '">');
    document.write('<embed src="' + flashurl + '" wmode="opaque" FlashVars="pics=' + pics + '&links=' + links + '&texts=' + texts + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '" menu="false" bgcolor="#FFFFFF" quality="high" width="' + focus_width + '" height="' + focus_height + '" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
    document.write('</object>');
}
