// cross navigator functions

var isDOM = (document.getElementById ? true : false); 
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
var isDyn = (isDOM || isIE4 || isNS4);

function getTag(id){
 if (isDOM) return document.getElementById(id);
 if (isIE4) return document.all[id];
 if (isNS4) return document.layers[id];
}

function getTagStyle(id){
 return (isNS4 ? getTag(id) : getTag(id).style);
} 
	
//*****************************************************************
// pop up
//*****************************************************************

function openNewWindow(URLtoOpen, windowName, windowFeatures) {
	if (windowFeatures.search(/scrollbars/) == -1) {
		windowFeatures = windowFeatures + ",scrollbars=0";
	}
	if (windowFeatures.search(/toolbar/) == -1) {
		windowFeatures = windowFeatures + ",toolbar=0";
	}
	if (windowFeatures.search(/titlebar/) == -1) {
		windowFeatures = windowFeatures + ",titlebar=0";
	}
	if (windowFeatures.search(/status/) == -1) {
		windowFeatures = windowFeatures + ",status=0";
	}
	if (windowFeatures.search(/resizable/) == -1) {
		windowFeatures = windowFeatures + ",resizable=0";
	}
	if (windowFeatures.search(/location/) == -1) {
		windowFeatures = windowFeatures + ",location=0";
	}
	if (windowFeatures.search(/left/) == -1) {
		windowFeatures = windowFeatures + ",left=10";
	}
	if (windowFeatures.search(/top/) == -1) {
		windowFeatures = windowFeatures + ",top=50";
	}
	window.open(URLtoOpen, windowName, windowFeatures); 
}
//*************************************************************