ns4 = (document.layers)? true:false
dom = (document.all)? true:false
ie5=navigator.userAgent.indexOf('MSIE 5')>0?true:false;

var collection="";
var styleObj="";
if (dom) {
	collection="all.";
	styleObj=".style";
	}

//**********image swapping**********


// Image swapping
function on(name){
if (document.images) {
obj=eval(document.images[name]);
switcher=eval(name+"_on");
obj.src=switcher.src;
}
}

function off(name){
if (document.images) {
obj=eval(document.images[name]);
switcher=eval(name+"_off");
obj.src=switcher.src;
}
}

//**********popup window size and conditions**********


	// Everything uses this baby
function getObject(obj) {
	var theObj;
	if (typeof obj=="string") {
		theObj= eval("document." + collection + obj + styleObj);
	}
	else {
		theObj=obj;
	}
	return theObj;
}

function show(obj) {
	var theObj=getObject(obj);
	theObj.visibility='visible';
}
	
function hide(obj) {
	var theObj=getObject(obj);
	theObj.visibility='hidden';
}

function moveTo(obj,xL,yL) {
        obj.left = xL;
        obj.top = yL;
}


function popup(path,winName){
	//Ignore winName
	popDialog=window.open(path,'winName',"width=550,height=375,scrollbars=auto,resizable=no,menubar=no,top=10,left=20,marginwidth=0,marginheight=0");
	setTimeout("popDialog.focus()",200);
}

function popup2(path,winName){
	//Ignore winName
	popDialog2=window.open(path,'winName2',"width=550,height=425,scrollbars=auto,resizable=no,menubar=no,top=10,left=10");
	setTimeout("popDialog2.focus()",200);
}

function popup3(path,winName){
	//Ignore winName
	popDialog3=window.open(path,'winName3',"width=400,height=340,scrollbars=yes,resizable=no,menubar=no,top=10,left=30");
	setTimeout("popDialog3.focus()",200);
}

function popup4(path,winName){
	//Ignore winName
	popDialog3=window.open(path,'winName3',"width=550,height=525,scrollbars=auto,resizable=no,menubar=no,top=10,left=30");
	setTimeout("popDialog3.focus()",200);
}

function popup_link(path,winName){
	//Ignore winName
	popDialog4=window.open(path,'winName4',"width=800,height=400,scrollbars=yes,resizable=yes,menubar=yes,top=10,left=30,toolbar=yes,location=yes");
	setTimeout("popDialog4.focus()",200);
}

function med_popup(path,winName){
	//Ignore winName
	popDialog3=window.open(path,'winName',"width=550,height=260,scrollbars=auto,resizable=no,menubar=no,top=10,left=30");
	setTimeout("popDialog3.focus()",200);
}
function medlarge_popup(path,winName){
	//Ignore winName
	popDialog3=window.open(path,'winName3',"width=560,height=350,scrollbars=auto,resizable=no,menubar=no,top=10,left=30");
	setTimeout("popDialog3.focus()",200);
}

function small_popup(path,winName){
	//Ignore winName
	popDialog3=window.open(path,'winName',"width=550,height=225,scrollbars=auto,resizable=no,menubar=no,top=10,left=30");
	setTimeout("popDialog3.focus()",200);
}

function large_popup(path,winName){
	//Ignore winName
	popDialog3=window.open(path,'winName3',"width=550,height=550,scrollbars=auto,resizable=no,menubar=no,top=10,left=30");
	setTimeout("popDialog3.focus()",200);
}
 
function xsmall_popup(path,winName){
	//Ignore winName
	popDialog3=window.open(path,'winName',"width=250,height=220,scrollbars=no,resizable=no,menubar=no,top=10,left=30");
	setTimeout("popDialog3.focus()",200);
}

function largescroll_popup(path,winName){
	//Ignore winName
	popDialog3=window.open(path,'winName3',"width=560,height=500,scrollbars=yes,resizable=no,menubar=no,top=10,left=30");
	setTimeout("popDialog3.focus()",200);
}

function largescroll_popup2(path,winName){
	//Ignore winName
	popDialog3=window.open(path,'winName3',"width=650,height=500,scrollbars=yes,resizable=no,menubar=no,top=10,left=30");
	setTimeout("popDialog3.focus()",200);
}


function writeTextInput(){
 var size;
 navigator.appName=="Netscape"?size=10:size=20;
 document.write('<input type="text" size="'+size+'">');
}
         
function writeTextarea(){
 var size;
 navigator.appName=="Netscape"?cols=25:cols=35;
 navigator.appName=="Netscape"?rows=5:rows=5;
 document.write('<textarea rows="'+rows+'" cols="'+cols+'" wrap="virtual"></textarea>');
}
