
// PUBLIC FUNCTIONS	
	
	// Pass an <A> object width a new window width & height
	function popUpCenterGrow(obj, w, h)
	{
		var detect = navigator.userAgent.toLowerCase();
		var OS,browser,version,total,thestring;

		if (checkIt('konqueror'))
		{
			browser = "Konqueror";
			OS = "Linux";
		}
		else if (checkIt('safari')) browser = "Safari"
		else if (checkIt('omniweb')) browser = "OmniWeb"
		else if (checkIt('opera')) browser = "Opera"
		else if (checkIt('webtv')) browser = "WebTV";
		else if (checkIt('icab')) browser = "iCab"
		else if (checkIt('msie')) browser = "Internet Explorer"
		else if (!checkIt('compatible'))
		{
			browser = "Netscape Navigator"
			version = detect.charAt(8);
		}
		else browser = "An unknown browser";

		if (!version) version = detect.charAt(place + thestring.length);

		if (!OS)
		{
			if (checkIt('linux')) OS = "Linux";
			else if (checkIt('x11')) OS = "Unix";
			else if (checkIt('mac')) OS = "Mac"
			else if (checkIt('win')) OS = "Windows"
			else OS = "an unknown operating system";
		}

		function checkIt(string)
		{
			place = detect.indexOf(string) + 1;
			thestring = string;
			return place;
		}

		if(OS == "Mac"){
			popUp(obj.href, w, h);
			return false;
		}

		if (eval(w)<10) { w = 10; } if (eval(h)<10) { h = 10; }		
		return launchGen(obj.href, obj.target, w, h);
	}

	function popUp(URL, width, height) {
		day = new Date();
		id = day.getTime();
		eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + width + ",height=" + height + ",left = 50,top = 50');");
	}

	function ShowRollOverPopUp(id)
	{	  
	   var content = document.getElementById(id);
	   if (content) {
	     content.style.visibility = "visible";
	   }
	}

	function HideRollOverPopUp(id)
	{	   
	   var content = document.getElementById(id);
	   if (content) {
	     content.style.visibility = "hidden";
	   }
	}




// PRIVATE do not call from HTML

	function launchGen(u,t,w,h) {
		var f="resizable=1";
		GrowFromCenter(u,t,w,h,f);
		return false;
	}

	function GrowFromCenter(u,n,w,h,f){		
		var WO=(d=document,WW=WH=100,s=window.screen,ws=s?1:0,sw=ws?s.availWidth:1024,sh=ws?s.availHeight:768,x=(sw-WW)/2,y=(sh-WH)/2,l=(sw-w)/2,t=(sh-h)/2,s='width='+WW+',height='+WH+',top='+y+',screeny='+y+',left='+x+',screenx='+x,s+=(d.layers)?',resizable':'',s+=(!f||f=='')?'':','+f,W=self[n]=window.open('',n,s),(W&&!W.closed)?1:0);while(WW!=w||WH!=h){if(WO&&WW<w){W.moveTo((sw-WW)/2,(sh-WH)/2);	W.resizeTo(WW,WH);WW*=1.3}if(WO&&WW>w){WW=w;W.moveTo((sw-WW)/2,(sh-WH)/2);W.resizeTo(WW,WH)}if(WO&&WH<h){W.moveTo((sw-WW)/2,(sh-WH)/2);W.resizeTo(WW,WH);WH*=1.3}if(WO&&WH>h){WH=h;W.moveTo((sw-WW)/2,(sh-WH)/2);W.resizeTo(WW,WH)}}if(d.layers){W.outerHeight=h;W.outerWidth=w;}W.moveTo(l,t);W.document.location=u;W.focus();
	}