/*	________________________________________________________________________________	
	Copyright © 1992-2003 Comspec Communications, Inc.									
	All Rights Reserved.																
	________________________________________________________________________________	
	Legal Notice																		
	The information contained within this document is confidential, copyrighted			
	and or trade secret. No part of this document may be reproduced or distributed		
	in any form or by any means, in whole or in part, without the prior written			
	permission of Comspec Communications, Inc.											
	________________________________________________________________________________	
	Version:	1.0																	
	File:		comspecDotCom-public.js												
	Description:	Public web client functionality										
																				   	  */

// determine stylesheet

var cssURL="library/public-safe.css";
var browserType=navigator.userAgent.toLowerCase();
if (browserType.indexOf("msie")!=-1) {
	cssURL="library/public-msie.css";
}
document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + cssURL + "\">");

function displayTextField(fieldName, formName) {

	var field = eval('document.'+ formName + '.' + fieldName);
	if (field.value=='other') {
	  if (document.getElementById) {
		document.getElementById('other').style.display='inline';
		document.getElementById('other').value="enter your text here";
		document.getElementById('other').focus();
	  }
	  else {
		/*document.layers['other'].style.display='inline';
		document.layers['other'].value="enter your text here";
		document.layers['other'].focus();*/
	  }
	}	
	else {
	  if (document.getElementById) {
		document.getElementById('other').style.display="none";
 	  }
	  else {
		//document.layers['other'].style.display="none";
	  }
	}
}

var IE4 = (document.all && !document.getElementById) ? true : false;
var NS4 = (document.layers) ? true : false;
var IE5 = (document.all && document.getElementById) ? true : false;
var N6 = (document.getElementById && !document.all) ? true : false;

function getElement(id) {
  if (NS4) {return eval("document." + id)}
  else if (IE4) {return eval("document.all." + id)}
  else if (IE5 || N6) {return document.getElementById(id)};
}

function gotoURL(page) {
	window.open(page, 
'_blank',"height=600,width=480,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,top=80"); 
}

function printablePage(page) {
        window.open(page,
'_blank',"height=600,width=670,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,top=80");
}

function emailPage(page) {
        window.open(page,'_blank',"height=448,width=490,status=no,toolbar=no,menubar=no,location=no,scrollbars=no,top=80");
}

function popupPage(page) {
        window.open(page,'_blank',"height=380,width=380,status=no,toolbar=no,menubar=no,location=no,scrollbars=no,top=80");
}
function jumptoURL(form, obj){
  if (eval('document.'+ form +'.' + obj +'.options[document.'+form+'.'+obj+'.selectedIndex].value') != "none") 
   {
     window.document.location = eval('document.'+form+'.'+ obj +'.options[document.'+form+'.'+obj+'.selectedIndex].value');
   }
}
function openPresentation(page){
	window.open(page,'_blank',"height=460,width=610,status=no,toolbar=no,menubar=no,location=no,scrollbars=no,top=80");
}

function popWin( url, name, width, height, scroller ) {
	var outStr = 'height=' + height + ',width=' + width;
	if (scroller != 'true') {
		outStr += ',menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=yes';
	} else {
		outStr += ',menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars,resizable=yes';
	}
	eval( name + " = window.open(\"" + url + "\", \"" + name + "\", \"" + outStr + "\");" );
	eval( name + ".focus();" );
}
function KW(){
setTimeout('window.close();',50);
}

