function toggleFSCInfo(showOrHide)
{
    FSCObj = document.getElementById("FSCInfoBox") ;
    FSCObj.style.display = showOrHide ? "block" : "none" ;
}

function popupWindow(theURL,theHeight,theWidth)
{newWindow = window.open(theURL,"ThomasNorman_popup","location=0,status=0,scrollbars=0,width=" + theWidth + ",height=" + theHeight);}

var flashObjArr = new Array();

function writeFlashObjs(isNotTransparent)
{
    for (var i=0;i<flashObjArr.length;i++)
    {
        //flashContainerID,height,width,targetFlashFile,altText,isTransparent
        thisFlashArr = flashObjArr[i].split(",") ;
        
        flashHTML  = "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"" + thisFlashArr[2] + "\" height=\"" + thisFlashArr[1] + "\" id=\"flash_" + thisFlashArr[0] + "\" align=\"middle\" alt=\"" + thisFlashArr[4] + "\">" ;
        flashHTML += "<param name=\"allowScriptAccess\" value=\"sameDomain\" />" ;
        flashHTML += "<param name=\"quality\" value=\"high\" />" ;
        flashHTML += "<param name=\"movie\" value=\"" + thisFlashArr[3] + "\" />" ;
        flashHTML += "<param name=\"FlashVars\" value=\"" + thisFlashArr[6] + "\" />" ;
        if (!isNotTransparent) {flashHTML += "<param name=\"wmode\" value=\"transparent\" />" ;}
        flashHTML += "<embed src=\"" + thisFlashArr[3] + "\" quality=\"high\" width=\"" + thisFlashArr[2] + "\" height=\"" + thisFlashArr[1] + "\" flashVars=\"" + thisFlashArr[6] + "\" name=\"flash_" + thisFlashArr[0] + "\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"" ;
        if (!isNotTransparent) {flashHTML += " wmode=\"transparent\"" ;}
        flashHTML += " />" ;
        flashHTML += "</object>" ;
        
        thisContainerObj = document.getElementById(thisFlashArr[0]);
        thisContainerObj.innerHTML = flashHTML ;
    }
}

function showLargeImg(imgSrc,imgHeader,showOrHide)
{
    boxObj       = document.getElementById("largeImgBox") ;
    imgHeaderObj = document.getElementById("imgHeader") ;
    imgHolderObj = document.getElementById("imgHolder") ;
    
    imgHolderObj.innerHTML = "<img src='images/products/" + imgSrc + "' alt='" + imgHeader + "' />" ;
    imgHeaderObj.innerHTML = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + imgHeader + "<span></span>" ;
    boxObj.style.display = showOrHide ? "block" : "none" ;
}

function launchImageLibrary(onOrOff)
{
    var containerObj = document.getElementById("imageLibraryContainer") ;
    if (onOrOff)
    {
        containerObj.style.display = "block" ;
        flashObjArr[0] = "imageLibrary,460,690,flash/imageLibrary.swf,Image Library,false" ;
        writeFlashObjs(true);
    }
    else
    {
        document.getElementById("imageLibrary").innerHTML = "" ;
        containerObj.style.display = "none" ;
    }
}
 
function popupWindow(targetURL)
{
    var newwin = window.open(targetURL);
    if (!newwin) {self.location = targetURL};
}