//Make sure nobody frames us//
if(top.location.href != document.location.href) {
 top.location.replace(document.location.href);
}

//Determine Where we are for dynamic linking//
var httpExp = /^http/i;
if(httpExp.test(location.href)) {
 var rootExp = /^(https?:\/\/[^\/]+\/)\??(.*[^\/]+(\.html)?.*$3?.*$3?.*)$/i;
 var domExp = /^https?:\/\/w{0,3}\.?([^\/]+)\/?$/;
} else {
 var rootExp = /^(.+\/pointmedical\.com\/)\??(.*[^\/]+(\.html)?.*$3?.*$3?.*)$/i;
 var domExp = /^.+\/(pointmedical\.com)\/?$/;
}
var root = (location.href).replace(rootExp,"$1");
var endURL = (location.href).replace(rootExp,"$2");
var myDomain = root.replace(domExp,"$1");
//NOTE: 'domain' is a reserved word, thus 'myDomain'//

var mailNameAdmin		= 'Eric Harris';
var mailAliasAdmin		= 'webmaster';
var mailNameIntl		= 'Michael I. Basta';
var mailAliasIntl		= 'doreen';
var mailNameDom			= 'Frank DeBartola';
var mailAliasDom		= 'fdebartola';
var mailNameCs			= 'Biljana Kajmakoski';
var mailAliasCs			= 'bkajmakoski';
//var mailNameDefault		= 'Kristie Hanlon';
//var mailAliasDefault	= 'khanlon';
var mailNameDefault		= mailNameCs;
var mailAliasDefault	= mailAliasCs;


//Which browser are we using?//
var Netscape = false; var IE = false;
if(navigator.appName == 'Netscape') {
 Netscape = true;
} else {
 IE = true;
	document.write('<META HTTP-EQUIV="imagetoolbar" CONTENT="no">');
	document.write('<meta name="MSSmartTagsPreventParsing" content="TRUE">');
}

document.oncontextmenu=function(){return false}



//document.write('<LINK REL="SHORTCUT ICON" HREF="'+root+'favicon.ico">');
//document.write('<LINK REL="P3Pv1" HREF="'+root+'w3c/p3p.xml">');
//document.write('<META NAME="ROBOTS" CONTENT="NOARCHIVE">');

window.defaultStatus = "Point Medical";
function display(message) {
	if(Netscape) {
	 netStatus();
	 if(document.child_window) { document.child_window.focus() }
	}
 window.status = "Point Medical     " + message;
}

if(Netscape) {
 netStatusRun = false;
 function netStatus() {
	 if(netStatusRun) { return }
		for(i=0; i<document.links.length; i++) {
		 document.links[i].onmouseout = function(){ window.status = '' }
		}
		netStatusRun = true;
	}
}

function nav(x) {
 document.location = root + x;
}

var emailExp = /^[\w\-\.]+\@[\w\-\.]+\.[\w\-\.]+$/;
function mail(name,email,subject,cc) {
 var page = document.location;
	if(email && !emailExp.test(email)) { email += '@'+myDomain }
	if(cc && !emailExp.test(cc)) { cc += '@'+myDomain }
 nav('cgi-bin/mail/emailer.cgi?compose=1&to_name=' + name + '&to_email=' + email + '&subject=' + subject + '&cc=' + cc + '&page=' + page);
}

function mailPage() {
 var deadloop = /mail_page\.cgi$/i; //Don't mail the mail_page page!//
 if(!deadloop.test(document.location) && httpExp.test(document.location)) {
		document.invis_mail_page.submit();
	}
}
//////////////////////////////////////////
// invisible form for function mailPage //
with(document) {
 write('<form name="invis_mail_page" method="POST" action="'+root+'cgi-bin/mail/mail_page.cgi">');
	write('<input type="hidden" name="page" value="' + document.location + '">');
	write('<input type="hidden" name="page_name" value="' + document.title + '">');
	write('<input type="hidden" name="evaluate" value="1">');
	write('</form>');
}

var child_window;
function small_window(path,x,y) {
	var centerV = screen.height / 3;
 var centerH = screen.width / 3;
	path = root + path.replace(/™/,"(TM)");
	if(x > 0 && y > 0) {
	 centerV = (screen.height / 2) - (y / 2);
		centerH = (screen.width / 2) - (x / 2);
	 top.child_window = window.open(path,"small_window",config='height='+y+',width='+x+',left='+centerH+',top='+centerV+'');
	} else {
  top.child_window = window.open(path,"small_window",config='height=100,width=300,left='+centerH+',top='+centerV+'');
	}
}
