<!--
// Copyright(c) 2004 Kazi S. Jahangir, All rights reserved
// Do not use without written permission from author.
// Please report any theft to www.pivotworld.com
// Common script for pages

var ns4 = false;
var ie4 = false;
var moz5 = false;
var menuLeft = 0;

function init(){
	if (document.getElementById)
		moz5 = true;
	else if (document.all)
		ie4 = true;
	else if (document.layers)
		ns4 = true;
		
	if (moz5 || ie4){
		document.onerrorupdate=stopError;
		window.onerror = stopError;
	}
	else if (ns4){
		document.captureEvents(Event.ERROR);
		document.onerror=stopError;
		window.onerror = stopError;
	}
	else
		return false;
	rePos();
	loadImg(7,"images/buttons",28,"home",66,"about",70,"web",60,"database",88,"contact",81,"map",84,"search",75);
	initDD();
}
function pageExit(){
	deleteMenu();
}
function stopError(){
	return true;
}

function rePos(){
	if (moz5 || ie4)
		menuLeft=224;
	else if (ns4)
		menuLeft=226;
	reposMenu (menuLeft);
}

var winHandle;

function openNewWin(fileName, x, y, nWidth, nHeight, bMenu, bScroll)
{ 
	var strDesc;
	if (bScroll)
		strDesc = "status=0,toolbar=0,resizable=1,scrollbars=1";
	else
		strDesc = "status=0,toolbar=0,resizable=1,scrollbars=0";
		
	strDesc = strDesc+(bMenu?",menubar=1":",menubar=0");
	if (moz5 || ie4)
		strDesc=strDesc+",left="+x+",top="+y+",width="+nWidth+",height="+nHeight;
	else if (ns4)
		strDesc=strDesc+",screenX="+x+",screenY="+y+",outerWidth="+nWidth+",outerHeight="+nHeight;
	winHandle= window.open(fileName,"myNewWin", strDesc);
}

function EmailForm(){
	openNewWin("http://www.pivotworld.com/email.asp",50,50,600,520,false,true);
}

//-->

