function sitemap() {
	w = 400;
	h = 500;
	var winl = (screen.width - w) / 8; 
	var wint = (screen.height - h) / 8; 
	sitemapwin = window.open("/website/applications/sitemap/sitemap.asp", "sitemap", 'width='+w+',height='+h+',top='+wint+',left='+winl+',scrollbars=0');
	if (parseInt(navigator.appVersion) >= 4) { sitemapwin.window.focus(); } 
}


function NewWindowScroll(mypage, myname, w, h) { 
	if(w == '')
		w = screen.width;
	if(h == '')
		h = screen.height;
	var winl = (screen.width - w) / 8; 
	var wint = (screen.height - h) / 8; 
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=0'
	win = window.open(mypage, myname, winprops) 
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } 
} 
function NewWindow(mypage, myname, w, h) { 
	if(w == '')
		w = screen.width;
	if(h == '')
		h = screen.height;
	var winl = (screen.width - w) / 8; 
	var wint = (screen.height - h) / 8; 
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl
	win = window.open(mypage, myname, winprops) 
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } 
} 

ns4 = (document.layers) ? true : false;
ie4 = (document.all) ? true : false;
dom = (document.getElementById) ? true : false;

//var numLayers = 3;
//function hideAll() {
 //   for (i=0; i<numLayers; i++) {
  //	  hide('bla'+i);
   // }
//}

var lastshowed='';

function showpop(id) {
	w = 400;
	h = 500;
	var winl = (screen.width - w) / 8; 
	var wint = (screen.height - h) / 8; 
	popwin = window.open("/website/include/asp/inc_framework.asp?toplinkid=" + id, "popwin", 'width='+w+',height='+h+',top='+wint+',left='+winl+',scrollbars=0');
	if (parseInt(navigator.appVersion) >= 4) { popwin.window.focus(); } 
}


function show(id) {
	if (lastshowed != '')
		hide(lastshowed);
	lastshowed=id;
	//hideAll()
	obj = (ns4)? document.layers[id] : (ie4)? document.all[id] : document.getElementById(id);
	styleObj = (ns4)? obj : obj.style;
	styleObj.left = (ns4)? (window.innerWidth-obj.clip.width)/2 : (document.body.offsetWidth-obj.offsetWidth)/2
	styleObj.top = 120
//	styleObj.top = (ns4)? (window.innerHeight-obj.clip.height)/2 : (document.body.offsetHeight-obj.offsetHeight)/2
	styleObj.visibility = "visible";
}

function hide(id) {
	obj = (ns4)? document.layers[id] : (ie4)? document.all[id] : document.getElementById(id);
	styleObj = (ns4)? obj : obj.style;
	styleObj.visibility = "hidden";
}


function CheckSize(){ 
  var maxW = 815;
  var maxH = 820;

  var cWidth = document.all ? document.body.offsetWidth : window.innerWidth;
  var cHeight = document.all ? document.body.offsetHeight : window.innerHeight; 

  if (cWidth>maxW || cHeight>maxH){ 
	window.resizeTo(maxW,maxH); 
  } 
} 

function Movie(mypage) { 
	w = 480;
	h = 620;
	var winl = (screen.width - w) / 8; 
	var wint = (screen.height - h) / 8; 
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl
	win = window.open(mypage, 'movie', winprops) 
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } 
} 
