

function newpop(url,name,toolbar,location,directories,status,menubar,scrollbars,resizable,width,height,top,left) {
	window.open(url,name,"toolbar="+toolbar+",location="+location+",directories="+directories+",status="+status+",menubar="+menubar+",scrollbars="+scrollbars+",resizable="+resizable+",width="+width+",height="+height+",top="+top+",left="+left+""); 
}


function openWindow(file)  {

var winWidth=656;
var winHeight=410;
var scroll=1;
var loc = 0;
var dir = 0;
var stat = 0;
var menu = 1;
var tool = 1;
var resize = 1;

leftPosition = (screen.width)?(screen.width-winWidth)/2:100;
topPosition = (screen.height)?(screen.height-winHeight)/2:100;

var settings = 'width='+winWidth+',height='+winHeight+',top='+topPosition+',left='+leftPosition+',scrollbars='+scroll+',location='+loc+',directories='+dir+',status='+stat+',menubar='+menu+',toolbar='+tool+',resizable='+resize+'';
	
window.open(file,"NewWindow",settings);

}


function mySplit(sep,lim){
  var str=this;
 var arr=new Array();
 var n=0;
	if(lim==null) lim=999999;
	while((str.indexOf(sep)!=-1)&&(n<lim-1)){
	  arr[n]=str.substring(0,str.indexOf(sep));
		str=str.substring(str.indexOf(sep)+1,str.length);
		n=n+1;
	}
	arr[n]=str;
	return(arr);
}

if(!"".split) "".split=mySplit;

var gen3 = (parseInt(navigator.appVersion) >= 2 && parseInt(navigator.appVersion) < 4);
var ie4 = (navigator.appVersion.indexOf("MSIE 4")!=-1);
var ieMac45 = (navigator.appVersion.indexOf("MSIE 4.5; Macintosh")!=-1);
var ie5 = (navigator.appVersion.indexOf("MSIE 5.0")!=-1);
var isMac=(navigator.appVersion.indexOf("Macintosh")!=-1)
var isUnix=((navigator.appVersion.indexOf("Linux")!=-1)||(navigator.appVersion.indexOf("Sun")!=-1))
var ns = (navigator.appName == 'Netscape');
var ie = (navigator.appName == 'Microsoft Internet Explorer');
var ns4 = ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) >= 4) && (parseInt(navigator.appVersion) < 5)&&(!gen3));
var ns6 = ((navigator.appName == 'Netscape') && parseInt(navigator.appVersion) >= 5 && parseInt(navigator.appVersion) < 6);
var docom = (ns4)?0:1;
var offsetX=7;
var offsetY=7;
var visible=(docom)?"visible":"show";
var hidden=(docom)?"hidden":"hide";
var DDBExists=0;
var MenuExists=0;
if(ieMac45) gen3=true;
if(ns6) gen3=true;

if(ns4) {var innerH=window.innerHeight;var innerW=window.innerWidth;}
function spoofGetElementById(ele){return (document.all[ele]);}
if((!ns4)&&(!document.getElementById)) document.getElementById=spoofGetElementById;
function clipLayer(eleId, x0, y0, x1, y1){if (ns4) {var ele = document[eleId];ele.clip.top = y0;ele.clip.right = x1;ele.clip.bottom = y1;ele.clip.left = x0;} else if (docom) document.getElementById(eleId).style.clip = 'rect(' + y0 + ',' + x1 + ',' + y1 + ',' + x0 + ')';}
function getLayerLeft(layer) { if (layer==null) layer=this; if (docom) return layer.style.pixelLeft; if (ns4) return layer.left; }
function getLayerTop(layer) { if (layer==null) layer=this; if (docom) return layer.style.pixelTop; if (ns4) return layer.top; }
function equalize(layer) { layer.getLeft = getLayerLeft;layer.getTop = getLayerTop;if (ns4) { layer.style = layer; } }
function getEQLayer(spec) { if (docom) {return document.getElementById(spec).style;} if (ns4) {return getLayer(spec);} }
function getLayer(spec,base) { if (docom) return document.getElementById(spec); var q=0; var temp=null;if (base==null) base=document; if (base.layers[spec]!=null) return base.layers[spec];for (q=0; q<base.layers.length; q++) { if(base.layers[q].document.layers.length>0) { temp = getLayer(spec,base.layers[q].document); if (temp != null) return temp;}}return null;}
function layerTag(theName,data,z,vis,l,t,w,h,estyle,extra) { var stuff;
  if (h==null) h=0;  w=(w==null)?'':'width:'+w+'px;';  if (t==null) t=0;  if (l==null) l=0;  if (vis) vis=visible; else vis=hidden;  if (z==null) z=10;if (estyle==null) estyle='';if (extra==null) extra='';   if (docom) { var px = (isNaN(w))? '':'px'; }
  if (docom) stuff = '<DIV ID="'+theName+'" STYLE="position:absolute; overflow:hidden; left:'+l+'px; top:'+t+'px; '+w+' height:'+h+'px; visibility:'+vis+'; z-index:'+z+';'+estyle+'" '+extra+'>'+data+'</DIV>\n';
  else stuff = '<LAYER NAME="'+theName+'" left="'+l+'" top="'+t+'"  height="'+h+'" visibility="'+vis+'" z-index="'+z+'" '+extra+'>'+data+'</LAYER>\n';
  return (stuff);
}
function getWidth(layer){
  if(docom) return (parseInt(document.getElementById(layer).clientWidth));
  if(ns4) return (document.layers[layer].document.width);
}
function getHeight(layer){
  if(docom) return ((isMac)?parseInt(document.getElementById(layer).clientHeight):parseInt(document.getElementById(layer).scrollHeight));
  if(ns4) return (document.layers[layer].document.height);
}
function getStyle(lname,lstyle){
	var st;
	if(docom){
		st=parseInt(document.getElementById(lname).style[lstyle]);
	} else {
		if((lstyle=="height")||(lstyle=="width")){
			st=parseInt(document[lname].clip[lstyle]);
		} else {
			st=parseInt(document[lname][lstyle]);
		}
	}
	return(st);
}
function setStyle(lname,lstyle,lval){if(docom){document.getElementById(lname).style[lstyle]=lval;} else {document[lname][lstyle]=lval;}}
function displayDecor(obj,status) {
	if(docom) if(status) obj.style.textDecoration="underline"; 
	else obj.style.textDecoration="none";
}
function displayDecorNoUnder(obj,status) {
	if(docom) if(status) obj.style.textDecoration="none"; 
	else obj.style.textDecoration="none";
}
function swap(lname,imgname,newimg){if(docom){document.getElementById(lname).document[imgname].src=newimg.src;} else {document.layers[lname].document.images[imgname].src=newimg.src;}}

function fixIElayers(){
  if(document.all){
    for (i in document.all.tags('DIV')){
	  if((i!='length')&&(i!='DDB3')){
	    if(parseInt(document.all[i].style.height)!=document.all[i].scrollHeight) {document.all[i].style.height=(parseInt(document.all[i].scrollHeight))?document.all[i].scrollHeight:document.all[i].clientHeight;}
		if(parseInt(document.all[i].style.width)!=document.all[i].scrollWidth) {document.all[i].style.width=(document.all[i].scrollWidth)?document.all[i].scrollWidth:document.all[i].clientWidth;}
	  }
	}
  }
}

function blurOut(n){if(docom)n.blur();}
//-->


var oldskool = true;

