

/** New Scripts **/
function v3doOpen(url, w, h){
	var posX, posY; //position of popup
	var offsetX=10, offsetY=10; //x and y offset relative to the parent window

	if (typeof window.screenLeft != "undefined"){ //IE
		posX = window.screenLeft + offsetX;
		posY = window.screenTop + offsetY;
	}
	else if (typeof window.screenX != "undefined"){ //NS/Moz
		posX = window.screenX + offsetX;
		posY = window.screenY + offsetY;
	}
	else { //default - center of screen
		posX = screen.availWidth/2 - w/2;
		posY = screen.availHeight/2 - h/2;
	}
	var win = window.open(url,"_blank","toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width="+w+",height="+h+",left="+posX+",top="+posY);
	win.focus();
}

 
function v3startApplicationSsl(app, page, param) {
	v3doOpen("https://ssl3.jnetapp.co.uk/"+app+"/"+page+"?"+param, 810, 800);
}
function v3startDevApplicationSsl(app, page, param) {
	v3doOpen("http://dev3.jnetapp.co.uk/"+app+"/"+page+"?"+param, 810, 800);
}
function v3startLocalApplicationSsl(app, page, param) {
	v3doOpen("http://localhost:9380/"+app+"/"+page+"?"+param, 810, 800);
}
function v3startLocalStdApplicationSsl(app, page, param) {
	v3doOpen("http://localhost:8080/"+app+"/"+page+"?"+param, 810, 800);
}

/** Old Scripts **/ 
function startApplicationSsl(app, page, param) {
    popupWindow1 = window.open("http://www.jnetapp.co.uk/cgi-bin/www.jnetapp.co.uk/redirect.pl?uri="+app+"%2F"+page+"&EncryptionKey="+param,"", "toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=1000,height=800,screenX=25,screenY=20,top=20,left=25");
}
function startDevApplicationSsl(app, page, param) {
    popupWindow1 = window.open("http://www.jnetapp.co.uk/cgi-bin/www.jnetapp.co.uk/devredirect.pl?uri="+app+"%2F"+page+"&EncryptionKey="+param,"", "toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=1000,height=800,screenX=25,screenY=20,top=20,left=25");
}
function startApplicationSslWH(app, page, param, width, height) {
    popupWindow1 = window.open("http://www.jnetapp.co.uk/cgi-bin/www.jnetapp.co.uk/redirect.pl?uri="+app+"%2F"+page+"&EncryptionKey="+param,"", "toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width="+width+",height="+height+",screenX=25,screenY=20,top=20,left=25");
}
function startDevApplicationSslWH(app, page, param, width, height) {
    popupWindow1 = window.open("http://www.jnetapp.co.uk/cgi-bin/www.jnetapp.co.uk/devredirect.pl?uri="+app+"%2F"+page+"&EncryptionKey="+param,"", "toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width="+width+",height="+height+",screenX=25,screenY=20,top=20,left=25");
}
/** New Scripts **/ 
function v2startApplicationSsl(app, page, param) {
    popupWindow1 = window.open("http://www.jnetapp.co.uk/cgi-bin/www.jnetapp.co.uk/redirect.pl?uri="+app+"%2F"+page+"&"+param,"", "toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=1000,height=800,screenX=25,screenY=20,top=20,left=25");
}
function v2startDevApplicationSsl(app, page, param) {
    popupWindow1 = window.open("http://www.jnetapp.co.uk/cgi-bin/www.jnetapp.co.uk/devredirect.pl?uri="+app+"%2F"+page+"&"+param,"", "toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=1000,height=800,screenX=25,screenY=20,top=20,left=25");
}
function v2startApplicationSslWH(app, page, param, width, height) {
    popupWindow1 = window.open("http://www.jnetapp.co.uk/cgi-bin/www.jnetapp.co.uk/redirect.pl?uri="+app+"%2F"+page+"&"+param,"", "toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width="+width+",height="+height+",screenX=25,screenY=20,top=20,left=25");
}
function v2startDevApplicationSslWH(app, page, param, width, height) {
    popupWindow1 = window.open("http://www.jnetapp.co.uk/cgi-bin/www.jnetapp.co.uk/devredirect.pl?uri="+app+"%2F"+page+"&"+param,"", "toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width="+width+",height="+height+",screenX=25,screenY=20,top=20,left=25");
}

function v2Arg2startApplicationSsl(app, page, param1, param2) {
    popupWindow1 = window.open("http://www.jnetapp.co.uk/cgi-bin/www.jnetapp.co.uk/redirect.pl?uri="+app+"%2F"+page+"&"+param1+"&"+param2,"", "toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=1000,height=800,screenX=25,screenY=20,top=20,left=25");
}
function v2Arg2startDevApplicationSsl(app, page, param1, param2) {
    popupWindow1 = window.open("http://www.jnetapp.co.uk/cgi-bin/www.jnetapp.co.uk/devredirect.pl?uri="+app+"%2F"+page+"&"+param1+"&"+param2,"", "toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=1000,height=800,screenX=25,screenY=20,top=20,left=25");
}
function v2Arg2startApplicationSslWH(app, page, param1, param2, width, height) {
    popupWindow1 = window.open("http://www.jnetapp.co.uk/cgi-bin/www.jnetapp.co.uk/redirect.pl?uri="+app+"%2F"+page+"&"+param1+"&"+param2,"", "toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width="+width+",height="+height+",screenX=25,screenY=20,top=20,left=25");
}
function v2Arg2startDevApplicationSslWH(app, page, param1, param2, width, height) {
    popupWindow1 = window.open("http://www.jnetapp.co.uk/cgi-bin/www.jnetapp.co.uk/devredirect.pl?uri="+app+"%2F"+page+"&"+param1+"&"+param2,"", "toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width="+width+",height="+height+",screenX=25,screenY=20,top=20,left=25");
}


function startTEMPApplicationSslWH(app, page, param, width, height) {
    popupWindow1 = window.open("http://ssl1.jnetapp.co.uk/"+app+"/"+page+"?EncryptionKey="+param,"", "toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width="+width+",height="+height+",screenX=25,screenY=20,top=20,left=25");
}

function startApplicationSslTheme(app, page, theme) {
    popupWindow1 = window.open("http://www.jnetapp.co.uk/cgi-bin/www.jnetapp.co.uk/redirect.pl?uri="+app+"%2F"+page+"&theme="+theme,"", "toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=1000,height=800,screenX=25,screenY=20,top=20,left=25");
}
function startDevApplicationSslTheme(app, page, theme) {
    popupWindow1 = window.open("http://www.jnetapp.co.uk/cgi-bin/www.jnetapp.co.uk/devredirect.pl?uri="+app+"%2F"+page+"&theme="+theme,"", "toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=1000,height=800,screenX=25,screenY=20,top=20,left=25");
}

//Dor's scripts below

function mailObfusc(mail1, mail2, mail3, linktext) {
	var seg1=('<a href="')
	var seg2=('mai')
	var seg3=('lto')
	var seg4=(':')
	var seg5=(mail1)
	var seg6=('@')
	var seg7=(mail2)
	var seg8=('.')
	var seg9=(mail3)
	var seg10=('">')
	var seg11=(linktext)
	var seg12=('</a>')
	document.write(seg1+seg2+seg3+seg4+seg5+seg6+seg7+seg8+seg9+seg10+seg11+seg12)
}

/* Client-side access to querystring name=value pairs
	Version 1.3
	28 May 2008
	
	License (Simplified BSD):
	http://adamv.com/dev/javascript/qslicense.txt
*/
function Querystring(qs) { // optionally pass a querystring to parse
	this.params = {};
	
	if (qs == null) qs = location.search.substring(1, location.search.length);
	if (qs.length == 0) return;

// Turn <plus> back to <space>
// See: http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1
	qs = qs.replace(/\+/g, ' ');
	var args = qs.split('&'); // parse out name/value pairs separated via &
	
// split out each name=value pair
	for (var i = 0; i < args.length; i++) {
		var pair = args[i].split('=');
		var name = decodeURIComponent(pair[0]);
		
		var value = (pair.length==2)
			? decodeURIComponent(pair[1])
			: name;
		
		this.params[name] = value;
	}
}

Querystring.prototype.get = function(key, default_) {
	var value = this.params[key];
	return (value != null) ? value : default_;
}

Querystring.prototype.contains = function(key) {
	var value = this.params[key];
	return (value != null);
}

