function doOpen() {
   window.open(this.href);
    return false;
}
function hideDiv(divname) {
        var divstyle = document.getElementById(divname).style;
        divstyle.display = "none";
}

function showDiv(divname) {
        var divstyle = document.getElementById(divname).style;
        divstyle.display = "block";
}

function IB_openPopupWindow(ourURL, windowName, features){
	window.open(ourURL, windowName, features);
}

function gotoURL(sURL) {
	window.location.href=sURL;
}

//For Flash Player Only.
function openFlashPlayer(sFlashFile, windowName, features, sDislpay, sPageTitle){
    var aDisplay = sDislpay.split("|");
    var winWidth = aDisplay[1];
    var winHeight = aDisplay[2];
    var winL = (screen.width - winWidth) / 2;
    var winT = (screen.height - winHeight) / 2;
    
    if (aDisplay.length==3){
        switch (aDisplay[0]){
        case "center" :
            features+=',width='+winWidth+',height='+winHeight+',left='+winL+',top='+winT;
            break;
        default :
            features+=',width='+winWidth+',height='+winHeight;
        }
    }
	window.open('/products/demos/player.asp?flashFile='+sFlashFile+'&pageTitle='+sPageTitle, windowName, features);
}

function Left(str, n){
	if (n <= 0)
	    return "";
	else if (n > String(str).length)
	    return str;
	else
	    return String(str).substring(0,n);
}
function Right(str, n){
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}
