ROOT_URL='/sitemap/'
action='/cgi-bin/sitemap/fp.pl'

IE = (document.all)
NS = (document.layers)

 ns4 = ((navigator.appName == "Netscape") && parseInt(navigator.appVersion) == 4);	

 widthChat=620+9; 
 heightChat=370+25; 
 widthYell=635; if (IE) {widthYell+=22}
 heightYell=390; if (IE) {heightYell+=36} // +16 for old reg form
 //heightYell=430; if (IE) {heightYell+=16}
// widthVideo=620+10; 
// heightVideo=370+5; 

//xPark=958;

xPark=screen.width-70;
yParkChat=0                 
xChat=(screen.width-widthChat-7)/2 
yChat=yParkChat;

// Reduce wasted space
 //widthVideo=screen.width/3.5-50
 //heightVideo=screen.height/3.5-20 
 widthVideo=220 //242
 heightVideo=179 //199
 
 yParkVideo=screen.height*.94-heightVideo; //if (NS) {yParkVideo+=30}
 xVideo=screen.width-widthVideo;  
 yVideo=yParkVideo
function setchatloaded(v)
{
    SetCookie('chatloaded',v);
}
function setvideoloaded(v)
{
    SetCookie('videoloaded',v);
}

expire = new Date (); expire.setYear(expire.getYear()+1);
document.write("<!--Last modified: "+ document.lastModified+"-->");

function Null(){}

function ns6() {return (document.getElementById) ? true:false} 

function exist(obj) {
//IE 4+, NN3+
return (obj && obj.open && !obj.closed)

// if (IE) {return (obj && obj.open && !obj.closed) } 
// if (obj) {return (!obj.header) ? false:true}
}

function getPath() {
path=document.location.pathname
return path.substring(0,path.lastIndexOf('/')) +'/'
}
function _resize() {
//local i=j=step=ww=hw=0
//  if (i<ww)  {resizeBy(+step,+0);i+=step}
//  if (j<hw)  {resizeBy(+0,+step);j+=step}
//  if (i<ww || j<hw)  {setTimeout('resize()',40)}
 return
}
/***********************/
function Show(showobj) {
	//alert("showobj is " + showobj);
	/*
	if(ns4)
	{
		 parent.document.layers[showobj].visibility = "visible";
		 return;
	}
	*/
	if (NS) 
	{
		 document.layers[showobj].visibility = "show";
	}
	else if (IE) document.all[showobj].style.visibility = "visible"
}
/***********************/
function Hide(hideobj) {	
	//alert(hideobj);
	if (NS) document.layers[hideobj].visibility = "hide"
	else if (IE) document.all[hideobj].style.visibility = "hidden"
}
/***********************/
function Check_Space(str1) {
// check & strip str1	
	while (str1.length >= 0) {		
		if(str1.indexOf(' ') == -1) return str1 // no blanks				
		if(str1.charAt(0) == ' ') {			
			str1 = str1.substring(1, str1.length)		
		} //delete first blank		
		if(str1.charAt(str1.length - 1) == ' ') {			
			str1 = str1.substring(0, str1.length - 1)		
		} //delete last blank		
		if(str1.indexOf(' ') != -1) {			
			str1 = str1.substring(0, str1.indexOf(' ')) + str1.substring(str1.indexOf(' ') + 1, str1.length)		
		} //delete middle blank	
	} // end while

	return ''
}
/***********************/
function Check_Str(str1, str2) 	{
// Check symbols from str1 must be in the str2
// return "" or bad symbols	
	str1_len = str1.length	

	for (i=0;i<str1_len;i++) {		
		if(str2.indexOf(str1.charAt(i)) == -1 ) return str1.charAt(i)	
	}	

	return ''
}
/***********************/
function getValue(str,lim1,lim2) {
         ind1=(lim1==null) ? 0:str.indexOf(lim1)
	 if (ind1==-1) {return ""}
         ind2=(lim2==null) ? str.length:str.indexOf(lim2) 
	 return str.substring(ind1+lim1.length,ind2)
}
/***********************/
function getParam(str) {
str2 = (str.indexOf("?")==-1) ? "":str.substring(str.indexOf("?")+1)
str = (str2.indexOf("?")==-1) ? str2:str2.substring(0,str2.indexOf("?"))
return str
}
/***********************/
function reload() {
  newWin=open(window.location.href,document.title,getParam(window.location.href));
  parent.close(); 
  return newWin
}
/***********************/
function SetCookie(name, value) {
    pathname = location.pathname;
    myDomain = pathname.substring(0,pathname.lastIndexOf('/')) +'/';
    myDomain='/'
    var largeExpDate = new Date ();
    largeExpDate.setTime(largeExpDate.getTime() + (365 * 24 * 3600 * 1000));
    setCookie(name, value, largeExpDate,myDomain);
}
/******************************/
function setCookie(name, value, expires, path, domain, secure) {
	if (!expires) {expires=expire}
	expires=expires.toGMTString()
		
	document.cookie = name + "=" + escape(value) +
		((expires) ? "; expires=" + expires : "") +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		((secure) ? "; secure" : "")
}
/***********************/

function getCookie(name) {
	var prefix = name + "="
	var cookieStartIndex = document.cookie.indexOf(prefix)
	if (cookieStartIndex == -1) return null
	var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)
	if (cookieEndIndex == -1) cookieEndIndex = document.cookie.length
	return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))
}

// name - name of the cookie
// [path] - path of the cookie (must be same as path used to create cookie)
// [domain] - domain of the cookie (must be same as domain used to create cookie)
// * path and domain default if assigned null or omitted if no explicit argument proceeds
/***********************/
function deleteCookie(name, path, domain) {
path='/'
	if (getCookie(name)) {
		document.cookie = name + "=" + 
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		"; expires=Thu, 01-Jan-70 00:00:01 GMT"
	}
}
/***********************/
function fixDate(date) {
	var base = new Date(0)
	var skew = base.getTime()
	if (skew > 0) date.setTime(date.getTime() - skew)
}
/***********************/
function getTime0() {
	d = new Date()
	hour = d.getHours()
	minute = d.getMinutes()
	second = d.getSeconds()
	if (hour < 10) hour = "0" + hour
	if (minute < 10) minute = "0" + minute 
	if (second < 10) second = "0" + second 
	return hour + ":" + minute + ":" + second
}
/***********************/
function getTime() {
	var now = new Date()
	var hour = now.getHours()
	var minute = now.getMinutes()
	now = null; var ampm = "" 
	if (hour >= 12) {hour -= 12; ampm = "PM"} else ampm = "AM"
	hour = (hour == 0) ? 12 : hour
	if (minute < 10) minute = "0" + minute // do not parse this number!
	return hour + ":" + minute + " " + ampm
}
/***********************/
function getDays(month, year) {
var ar = new Array(31,28,31,30,31,30,31,31,30,31,30,31)
if (year % 4 == 0) ar[1]+=1
return ar[month]
}
/***********************/
function getMonthName(month) {
var ar = new Array("January","February","March","April","May","June","July","August","October","September","November","December")
return ar[month]
}
/***********************/
function getweekDay(nDay) {
var weekDay = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
return weekDay[nDay]
}
/***********************/
function getURLParams() {
        url=new String(document.location);
		//var idx = document.URL.indexOf('?');
		var idx = url.indexOf('?');
		var params = new Array();

		if (idx != -1) {
			//var pairs = document.URL.substring(idx+1, document.URL.length).split('&');
			var pairs = url.substring(idx+1, url.length).split('&');
				for (var i=0; i<pairs.length; i++) {
					nameVal = pairs[i].split('=');
					params[nameVal[0]] = nameVal[1];
				}
		}	
		return params;
	}
/***********************/
/***********************/
/***********************/
/***********************/

