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 link_popup(path,winName){
	//Ignore winName
	popDialog4=window.open(path,'winName4',"width=790,height=350,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=530,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=200,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=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=16;
 document.write('<form method="get" action="http://search.atomz.com/search/"><input size="'+size+'" name="sp-q"><p><input type=submit value="Submit"><input type=hidden name="sp-a" value="sp1000f8ea"></form>');
}

function writeTextInput1(){
 var size;
 navigator.appName=="Netscape"?size=7:size=15;
 document.write('<table border=0 cellpadding=0 cellspacing=0><tr><td><form method="get" action="http://search.atomz.com/search/"><input size="'+size+'" name="sp-q"></td></tr><tr><td><div align=right><input type="image" value="submit" img src="images/b_go.gif" width="30" height="30" alt="Submit query" border="0" align="right"><input type=hidden name="sp-a" value="sp1000f8ea"></div></form></td></tr></table>');
}
         
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>');
}




