// Miscellaneous Functions & Paths


// *********************************************************
// Site Path for secure and non-secure pages
// *********************************************************

// *** Live ***
var strSecure = "https://www.responsivate.com/secure/"
var strNonsecure = "http://www.responsivate.com/"

// *** Test ***
//var strSecure = "http://swdevweb/dmfom/";
//var strNonsecure = "http://swdevweb/dmfom_brochureware/";



// *********************************************************
// Browser Detection - Experian Ltd
// *********************************************************

var is_nav4up;
var is_nav6up;
var is_ie4up;

// Get browser version and populate global variables
	
	function GetBrowserVersion() {
		var agt=navigator.userAgent.toLowerCase();
	
		// Browser Version
	    var is_major = parseInt(navigator.appVersion);
	    var is_minor = parseFloat(navigator.appVersion);
	
	    // Note: Opera and WebTV spoof Navigator.  We do strict client detection.
	    // If you want to allow spoofing, take out the tests for opera and webtv.
	    var is_nav  = ((agt.indexOf('mozilla') != -1) &&
			(agt.indexOf('spoofer') == -1) &&
		    (agt.indexOf('compatible') == -1) &&
		    (agt.indexOf('opera') == -1) &&
		    (agt.indexOf('hotjava') == -1) &&
		    (agt.indexOf('webtv') == -1) );
	    		    	
	    var is_ie   = (agt.indexOf("msie") != -1);
	    
	    is_nav4up = (is_nav && (is_major >= 4));
	    is_nav6up = (is_nav && (is_major >= 6));   
	    is_ie4up  = (is_ie  && (is_major >= 4));
	}


// *********************************************************
// Open Modal Window - Richard Gosling 08/03/2002
// *********************************************************

function ModalWin(url){
	
	//Modal windows only supported by IE4+
	//Not supported by NS browsers
	
	GetBrowserVersion();
	if (is_ie4up) {//Use modal win for IE
		window.showModalDialog(url);
	} else {//Use normal popup for all other browsers
		newWindow=window.open(url,"subWin","Height=300,Width=480");
		newWindow.focus();
	}	
}

function NormalWin(url){
	
	newWindow=window.open(url,"subWin","scrollbars,Height=460,Width=500");
	newWindow.focus();	
}


// *********************************************************
// Centre Window on screen- Richard Gosling 28/03/2002
// *********************************************************

function CentreWin(){
	//for popup windows
	ScreenW = (screen.availWidth)
	ScreenH = (screen.availHeight)
	WinW = 500
	WinH = 480
	
	LeftPosition =(ScreenW/2) - (WinW/2);
	TopPosition =(ScreenH/2) - (WinH/2);
	window.moveTo(LeftPosition,TopPosition);
}

