<!--
function BRB_PHP_DelWithCon(deletepage_url,field_name,field_value,messagetext) { //v1.0 - Deletes a record with confirmation
  if (confirm(messagetext)==1){
  	location.href = eval('\"'+deletepage_url+'?'+field_name+'='+field_value+'\"');
  }
}
//-->

<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function doSubmit(thisForm) {
	var theForm = document.getElementById(thisForm);
	theForm.submit();

}
function checkKey(thisForm) {
	var key = document.layers ? evt.which 
            : document.all ? event.keyCode
            : evt.keyCode;
	var keyName = String.fromCharCode(key);
	if (key==13) {
		doSubmit(thisForm);
		return false;
	}
}

function toggle(me) {
	me = document.getElementById(me);
	if (me.style.display != "block") {
		me.style.display = "block";
	} else {
		me.style.display = "none";
	}
}

function setNotice(state) {
	notice = document.getElementById('notice_holder');
	notice.style.display = (state=='show') ? 'block' : 'none';
	if(state!='show') {
		nc = document.getElementById('div_notice_text');
		nc.innerHTML = " ";
	} // remove content
	if(state=='show') { window.scrollTo(0,0); } // scroll to the top of the page 
}

function noticeContent(cont) {
	cont = unescape(cont)
	replaceThis = "+";
	cont = cont.replace(/\+/g," ");
	setNotice("show");
	document.getElementById('div_notice_text').innerHTML = cont;
}

function stristr( haystack, needle, bool ) {
    var pos = 0;
    haystack += '';
    pos = haystack.toLowerCase().indexOf( (needle+'').toLowerCase() );
    if( pos == -1 ){
        return false;
    } else{
        if( bool ){
            return haystack.substr( 0, pos );
        } else{
            return haystack.slice( pos );
        }
    }
}

function insertVideo(vid) {
	flashFile = "user_files/images/bodyText_images/flash/"; // SWF file directory
	//flashFile += args.tag; // choose swf file (tag name)
	flashFile += (vid) ? vid : "cabletrack"; // choose default swf file
	flashFile += ".swf"; // add .SWF 

	fID = 'video';
	fWidth = '640';
	fHeight = '498';
	
	flashVars = '';
	//alert(flashVars)
	flash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="'+fWidth+'" height="'+fHeight+'" id="'+fID+'_obj"><param name="movie" value="'+flashFile+'" /><param name="quality" value="high" /><param name="menu" value="false" /><param name="scale" value="noscale" /><param name="allowScriptAccess" value="always" /><param name="wmode" value="transparent" /><param name="swliveconnect" value="true" /><param name="flashVars" value="'+flashVars+'" /><embed id="'+fID+'_emb" src="'+flashFile+'" quality="high" menu="false" scale="noscale" wmode="transparent" allowScriptAccess="always" swliveconnect="true" flashVars="'+flashVars+'" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+fWidth+'" height="'+fHeight+'"></embed></object>';
	noticeContent(flash);
	args = '';
}

function showImage(imgs,txt) {
	txt = (txt) ? txt : '';
	obj = document.getElementById('div_notice_text');
	insertGallery(obj,imgs,txt)
	setNotice("show");
}


/*
function columnHeights() {
		leftDiv = document.getElementById('div_leftbar');
		middleDiv = document.getElementById('div_contentarea');
		rightDiv = document.getElementById('div_rightbar');
		
		highest = middleDiv.offsetHeight;
		highest = (leftDiv.offsetHeight>highest) ? leftDiv.offsetHeight : highest;
		highest = (rightDiv.offsetHeight>highest) ? rightDiv.offsetHeight : highest;

		leftDiv.style.height = highest+"px";
		middleDiv.style.height = highest+"px";
		rightDiv.style.height = highest+"px";
		
}
// opera is not quick enough to handle the columnHeight script 
// so check if the browser is not opera and append body attribute
if(navigator.userAgent.indexOf("Opera")==-1){
	if(window.addEventListener) window.addEventListener("load", columnHeights, false); // for non IE browsers
	else if(window.attachEvent) window.attachEvent("onload", columnHeights);			 // for IE
}
*/
