ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

layerRef = (ns4) ? "document" : "document.all";
styleRef = (ns4) ? "" : ".style";

function show(id)
 {
  if (ns4) document.layers[id].visibility = "show"
  else if (ie4) document.all[id].style.visibility = "visible"
 }

function hide(id)
 {
  if (ns4) document.layers[id].visibility = "hide"
  else if (ie4) document.all[id].style.visibility = "hidden"
 }
 
 // find DOM script

var isDHTML = 0;
var isLayers = 0;
var isAll = 0;
var isID = 0;
if (document.getElementById) {isID = 1; isDHTML = 1;}
else {
	if (document.all) {isAll = 1; isDHTML = 1;}
	else {
		browserVersion = parseInt(navigator.appVersion);
	if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {isLayers = 1; isDHTML = 1;}
}}

function findDOM(objectID,withStyle) {
	if (withStyle == 1) {
		if (isID) { return (document.getElementById(objectID).style); }
		else {
			if (isAll) { return (document.all[objectID].style); }
		else {
			if (isLayers) { return (document.layers[objectID]); }
		};}
	}
	else {
		if (isID) { return (document.getElementById(objectID)); }
		else {
			if (isAll) { return (document.all[objectID]); }
		else {
			if (isLayers) { return (document.layers[objectID]); }
		};}
	}
} 

               
// scroll left to right

var isIE = 0;
if (navigator.appName.indexOf('Microsoft Internet Explorer') != -1) {isIE = 1;}

function scrollPageTo(x,y) {
	if (isIE) {
		document.body.scrollLeft = x;
		document.body.scrollTop = y;
		return;
	}
	else {
		scrollTo(x,y)
		return;
	}
}


// Netscape Resize Css Fix

function CSSfix()
 {
  if (document.self.CSSfix.initWindowWidth != window.innerWidth || document.self.CSSfix.initWindowHeight != window.innerHeight)
   {
    document.location = document.location;
   }
 }

function CSSfixCheckIn()
 {
  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4))
   {
    if (typeof document.self == 'undefined')
     {
      document.self = new Object;
     }
    if (typeof document.self.self_scaleFont == 'undefined')
     {
      document.self.CSSfix = new Object;
      document.self.CSSfix.initWindowWidth = window.innerWidth;
      document.self.CSSfix.initWindowHeight = window.innerHeight;
     }
    window.onresize = CSSfix;
   }
 }

CSSfixCheckIn()

