window.onload = function() { add_status(); }

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
};

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
};

function openNewWindow(URLtoOpen, windowName, windowFeatures) {
	newWindow=window.open(URLtoOpen, windowName, windowFeatures); 
};

/////////////////////////////////////////////////////////////////
function show(id) {
	document.getElementById(id).style.visibility = "visible";
}
/////////////////////////////////////////////////////////////////
function hide(id) {
	document.getElementById(id).style.visibility = "hidden";
}
/////////////////////////////////////////////////////////////////
function showBlock(id) {
	document.getElementById(id).style.display = "block";
}


//RETURNS THE LEFT NUMBER OF CHARACTERS REQUESTED FROM A STRING
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);
    }
};

///
function vidload(who, what, width, height) {
	document.getElementById(who).innerHTML = "./img/working-300.gif"
	str = '';
	str += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+ width +'" height="'+ height +'" id="FLVPlayer" style="margin: 0 0 17px 10px;">';
  	str += '<param name="movie" value="FLVPlayer_Progressive.swf" >';
  	str += '<param name="salign" value="lt" >';
  	str += '<param name="quality" value="high" >';
  	str += '<param name="scale" value="noscale" >';
  	str += '<param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Clear_Skin_2&streamName='+ what +'&autoPlay=true&autoRewind=false" >';
  	str += '<embed src="FLVPlayer_Progressive.swf" flashvars="&MM_ComponentVersion=1&skinName=Clear_Skin_2&streamName='+ what +'&autoPlay=true&autoRewind=false" quality="high" scale="noscale" width="'+ width +'" height="'+ height +'" name="FLVPlayer" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" style="margin: 0 0 15px 0;">';
	str += '</object>';

	document.getElementById(who).innerHTML = str;
	return false;
}
