// Library with main functions
// Author : William L.B.J. Dekker
// (C) 2004, axcessPro
// http://www.axcesspro.com/
		
//--Global variables------------------------------------------

var msg1 = 'Welkom bij axcessPro - Business Security Concepts';

var newsItem = 0;
var newsPage = "index.html";

//--Browser Detection---------------------------------------

var ns4= (navigator.appName=='Netscape' && parseInt(navigator.appVersion)==4);
var ns6= (document.getElementById)? true:false;
var ie4plus = (document.all)? true:false;
var ver4 = (ns4 || ie4plus || ns6) ? true : false;

// script to escape from other frames and to set 
// window size to a maximum size of 1024 x 768 pixels or to
// the maximum available size if less than 1024 x 768 pixels

if (top.frames.length != 0) {
	top.location = self.document.location;
}

if (screen.width > 1024 && screen.height > 768) {
	var windowW = 1024;
	var windowH = 768;
	var windowX = (screen.availWidth/2)-(windowW/2);
	var windowY = (screen.availHeight/2)-(windowH/2);
}
else {
	var windowW = screen.availWidth;
	var windowH = screen.availHeight;
	var windowX = 0;
	var windowY = 0;
}

//Auto Maximize Window Script

top.window.moveTo(windowX,windowY);
if (document.all) {
	top.window.resizeTo(windowW,windowH);
}
else if (document.layers||document.getElementById) {
	if (top.window.outerHeight < windowH||top.window.outerWidth < windowW){
	top.window.outerHeight = windowH;
	top.window.outerWidth = windowW;
	}
}

//--script to send email with email client-------------------

	function sendEmail(name,prefix) {
	
		var domain = 'axcesspro.com';
		
		parent.location.href='mailto:'+name+'%20%3C'+prefix+'%40'+domain+'%3E';
		
	}

//--end of email script-------------------------------------------

//--scripts to display and clear messages in the Status Bar--

	function clearStatus() {
		
		window.status= '';
	  	return true
	}
	
	function setStatus(msg) {
		
		window.status= msg;
	  	return true
	}

//--End of status messages scripts---------------------------

// Script to another page in history -----------------------------

function previousPage(step) {
	history.go(step);
}

//--End of script -----------------------------------------------


//--Script to open a PDF document in a new window----------

function openPdfDoc(url) {

	var windowH = 0.8 * screen.availHeight;
	var windowW = 0.8 * screen.availWidth;
	
	var pdfdoc = window.open(url,"pdfdoc","height="+windowH+",width="+windowW+",left=0,top=0,resizable=yes,status=yes,toolbar=no,scrollbars=no,location=no,menubar=yes,directories=no");
	pdfdoc.focus();

}

//----end of library----------------------------------------------

