// -- Disable Right Click

am = '    Welcome to\n\nBlueFish - Pasadena!';
bV  = parseInt(navigator.appVersion);
bNS = navigator.appName=='Netscape';
bIE = navigator.appName=='Microsoft Internet Explorer';

function nrc(e) {
   if (bNS && e.which > 1){
      alert(am);
      return false;
   } else if (bIE && (event.button >1)) {
     alert(am);
     return false;
   }
}

/*
document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;
*/
// - Disable Right Ends



image1 = new Image();
image1.src = "/static/images/buttons/about_939393.jpg";

image2 = new Image();
image2.src = "/static/images/buttons/about_424149.jpg";

image3 = new Image();
image3.src = "/static/images/buttons/menu_939393.jpg";

image4 = new Image();
image4.src = "/static/images/buttons/menu_424149.jpg";

function change_txt_color(txt_id,bg_id)	{

	txt_color=document.getElementById(txt_id).style.color;
	bg_color=document.getElementById(bg_id).style.backgroundColor;

	if (bg_color.indexOf("gb")>0)	{
		par_beg=bg_color.indexOf("(")+1;
		par_end=bg_color.lastIndexOf(")");

		rgb=bg_color.substring(par_beg,par_end);
		arr=rgb.split(",");

		r=toHex( (arr[0]).replace(/^\s+|\s+$/, '') );
		g=toHex( (arr[1]).replace(/^\s+|\s+$/, '') );
		b=toHex( (arr[2]).replace(/^\s+|\s+$/, '') );

		bg_color=r+g+b;
	}
	else
		bg_color=bg_color.substr(1);

	new_img_src="/static/images/buttons/"+txt_id+"_"+bg_color+".jpg";
	document.images[txt_id].src=new_img_src;

	document.getElementById(txt_id).style.color=bg_color;
	document.getElementById(bg_id).style.backgroundColor=txt_color;

}
function toHex(N) {
	if (N==null) return "00";
	N=parseInt(N); if (N==0 || isNaN(N)) return "00";
	N=Math.max(0,N); N=Math.min(N,255); N=Math.round(N);
	return "0123456789ABCDEF".charAt((N-N%16)/16)+"0123456789ABCDEF".charAt(N%16);
}
