// add your js information here


function openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function closeWindow() {
        top.close();
        return false;
}
var modifyWindow;
function OpenWindow(url,width,height,scrollbars,windowname)
{
	var w = width;
	var h = height;
	var s = scrollbars;
	var x = 100;
	var y = 150;
	if (document.all)
	{
		var xMax = screen.width, yMax = screen.height;
		x = ((xMax/2) - (w/2));
		y = ((yMax/2) - (h/2));
	}
	else if (document.layers) 
	{
		var xMax = window.outerWidth, yMax = window.outerHeight;
		x = ((xMax/2) - (w/2));
		y = ((yMax/2) - (h/2));
	}
	
	options = "screenX=" + x + ",screenY=" + y + ",top=" + y + ",left=" + x + ",toolbar=0,status=0,menubar=0,scrollbars="+ s +",resizable=0,width=" + w +",height=" + h;
	modifyWindow = window.open(url,windowname,options);
	if (modifyWindow.opener == null) 
		modifyWindow.opener = self;
	modifyWindow.focus();
}
// Very basic.. changes the colors.. two variables passed.
// tr and the color to change it to..
function onColor(lay, thisColor)
{
	lay.style.backgroundColor=thisColor;
}

function offColor(lay, thisColor)
{
	if (thisColor == "cccc99")
	{
		lay.style.backgroundColor = 'DBE4F8';
	}
	else
	{
	lay.style.backgroundColor=thisColor;
	}
}
function callFormValidation(form) {
 if (validateForm(form,0,0,0,0)){
  form.submit();
 }
}		

// Parts of Code By:  Gregor (legreg@legreg.de) 
// Modified by Umer Farooq (umer@octadyne.com)
// (c) Octadyne System Inc.
// You can use this code as long as the above notices stay in place.
angel = (navigator.appName == "Netscape");
devel = (navigator.appName == "Microsoft Internet Explorer");
var ie4 = (document.all) ? true : false;
var ns4 = (document.layers) ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false;
function hidelayer(lay) {
if (ie4) {
          document.all[lay].style.visibility = "hidden"; 
          document.all[lay].style.zIndex = 0;
		  }
else if (ns4) {document.layers[lay].visibility = "hide";
          }
else if (ns6) {
//document.getElementById([lay]).style.visibility = "hidden";
// The above listed code seems to work as long as the layer is visible from the start..
// but if the layer is hidden from the start it doesn't work..
// So we get all the div tags.. and then we select the div tag we are working on
// and go from there. Draw back is we might run into problems with the layer being 
// set in the span tag. But since SPAN is not to happy in netscape.. we will stay away from it.
// if u use span then you can fix that by.. checking if the divTags[lay] is defined.. 
// if it is not then u would work with the span..
 divTags = document.getElementsByTagName("div");
 divTags[lay].style.visibility = "hidden";
}
}
function showlayer(lay) {
if (ie4) {document.all[lay].style.visibility = "visible";}
if (ns4) {document.layers[lay].visibility = "show";}
if (ns6) {
//document.getElementById([lay]).style.visibility = "visible";
 divTags = document.getElementsByTagName("div");
 divTags[lay].style.visibility = "visible";
 }
}

   function writeEmailAddress(name,domain) {
	   Address=(name+ '@' +domain)
	   document.write('<a href="mailto:' + Address + '">' + Address + '</a>')
   }
   
   function goToLocation(url)
   {
   		document.location.href = url;
   }
   
function sendToLocation(location)
{
	document.location.href= location;
}	


var onBodyLoads = new Array();
function bodyOnLoad() {
     for ( var i = 0 ; i < onBodyLoads.length ; i++ )
        onBodyLoads[i]();
  }
  
function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}