<!--

// globals
path_www = "/";
seo_urls = true;

// sniff browser
dom = (document.getElementById) ? true : false;
ns4 = (document.layers) ? true : false;
ie 	= (document.all) ? true : false;
ie4 = ie && !dom;
mac = (navigator.appVersion.indexOf("Mac") != -1);
safari = (navigator.appVersion.indexOf("Safari") != -1);
macIE5 = ((navigator.appVersion.indexOf("MSIE 5") != -1) && (navigator.appVersion.indexOf("Mac") != -1));
winIE6 = ((navigator.appVersion.indexOf("MSIE 6") != -1) && (navigator.appVersion.indexOf("Windows") != -1));
ie4m = ie4 && mac;
browser = ns4 ? "ns4" : dom ? "dom" : "ie4";
os = navigator.platform;


// Functions
function mm_findobj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexof("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=mm_findobj(n,d.layers[i].document);
  if(!x && document.getelementbyid) x=document.getelementbyid(n); return x;
}

function mm_showhidelayers() { //v3.0
  var i,p,v,obj,args=mm_showhidelayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=mm_findobj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function preload() {
	img = new Array(
	'images/NAV1on.png',
	'images/NAV2on.png',
	'images/NAV3on.png',
	'images/NAV4on.png',
	'images/NAV5on.png',
	'images/NAV6on.png',
	'images/NAV7on.png',
	'images/NAV8on.png',
	'images/NAV9on.png'
	);
	
	for(x=0;x<img.length;x++) {
		name=img[x].substring(img[x].indexOf("/")+1,img[x].indexOf("on"));
		eval(name+"= new Image();");
		eval(name+".src=img[x];");
		break;
	}
}

function changeImage(target,img) {
	eval("document.images['"+target+"'].src=img;");
}

function email_check(str) {
	var pat=/^[a-z'0-9]+([._-][a-z'0-9]+)*@([a-z0-9]+([._-][a-z0-9]+))+$/;
    if(str.search(pat)==-1)
		return false;
	else 
		return true;
}

function loadCSS() {
	document.writeln('<link href="'+path_www+'css/'+browser+'.css" rel="stylesheet" type="text/css" />');
}

function doLine(h,color) {
	document.writeln(
	'<table width=100% cellpadding=0 cellspacing=0 border=0>'+
		'<tr>'+
			'<td width=100% height='+h+' bgcolor='+color+'>'+
				'<img src="images/spacer.gif" width=1 height=1>'+
			'</td>'+
		'</tr>'+
	'</table>'
	);
}

function doCacheUpdate(p) {
	w = window.open('','pop','width=350,height=125,location=no,menu=no,resizable=no,scrollbars=no,toolbar=no');
	w.document.write(
		'<iframe frameborder=0 width=0 height=0 src="../index.php'+p+'&update_cache=1"></iframe>'+
		'<div align=center style="width:100%;height:100%">Live Cache Updated!<p><a href="javascript:self.close();">Close Window</a></div>'
	)
}

function pop(url,name,size) {
	w = window.open(url,name,size+'location=no,toolbar=no,menu=no,scrollbars=no,resizable=no');
	return w;
}

function popHTML(code,name,size) {
	w = window.open("",name,size+'location=no,toolbar=no,menu=no,scrollbars=no,resizable=no');
	w.document.write(code);
	return w;
}

function checkAction(url,msg) {
	t = confirm(msg);
	
	if(t)
		self.location = url;
	else
		return false;
}

function swapBgColor(obj,color) {
	obj.style.backgroundColor=color;
	obj.bgColor=color;
}
  
  


// Load stylesheet
loadCSS();

-->