function setDisplay(eltID, toDisplay) {
    var elt = document.getElementById(eltID);
    if (elt!=null) {
        if (toDisplay) 
            elt.style.display = "";
        else 
            elt.style.display = "none";
    }
}

function switchDisplay(onId, offId) {
    setDisplay(onId, true);
    setDisplay(offId, false);
}

function writeFlash(src, width, height) {
    if (height!='') 
        height = 'height="' + height + '"';    
    var str = '<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' +  
        'WIDTH="' + width + '" ' + height +  
        'CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0"> ' + 
        '<PARAM NAME="MOVIE" VALUE="' + src + '"/> ' + 
        '<PARAM NAME="PLAY" VALUE="true"/> ' + 
        '<PARAM NAME="QUALITY" VALUE="best"/> ' + 
        '<PARAM NAME="LOOP" VALUE="true"/> ' + 
		'<PARAM NAME="wmode" VALUE="opaque"/> ' + 
        '<EMBED wmode="opaque" SRC="' + src + '" WIDTH="' + width + '" ' + height +' PLAY="true" LOOP="true" QUALITY="best" ' + 
            'PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> ' + 
        '</EMBED>' + 
    '</OBJECT>';
    document.write(str);
}

function showForm(itemID){
    document.getElementById(itemID).style.display = 'inline';
}

function hideForm(itemID){
    document.getElementById(itemID).style.display = 'none';
}

var newwindow;

function openWindow(url) {
    newwindow=window.open(url,'name','width=930,height=785,toolbar=no,resizable=no,status=no');
if(window.focus){newwindow.focus()}
}
