﻿function addLoadEvent(f) { var _o = window.onload; if (typeof _o != 'function') { window.onload = f; } else { window.onload = function() { _o(); f(); } } }
function $(arg) {
    if (typeof arg == "function") {
        addLoadEvent(arg);
        return;
    }
    return document.getElementById(arg);
}
function focusFlash(val) {
    var focus_width = 180;
    var focus_height = 120;
    var text_height = 20;
    var swf_height = focus_height + text_height;

    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="/images/focus1.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
    document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
    document.write('<param name="FlashVars" value="pics=' + val.pics + '&links=' + val.links + '&texts=' + val.texts + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '">');
    document.write('<embed src="/images/focus1.swf" flashVars="pics=' + val.pics + '&links=' + val.links + '&texts=' + val.texts + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' + focus_width + '" height="' + swf_height + '"></embed>');
    document.write('</object>');
}
function Swf(url, w, h) {
    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="' + w + '" height="' + h + '">');
    document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+url+'"><param name="quality" value="high"><param name="menu" value="false">');
    document.write('<embed src="'+url+'" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' + w + '" height="' + h + '"></embed>');
    document.write('</object>');
}
