/**
/* 	Standard functions
/*	 
*/


/**
/*	Pop-Up Function 4 GSK - EDS-Modules
/*  x: URL
/*	h: height
/*	w: width
/*	t: top offset
/*	l: left offset
*/
function nwr(x,w,h,t,l,n){
	if (h == "") h = 100;
	if (w == "") w = 100;
	if (t == "") t = 10;
	if (l == "") l = 10;
	if (n == "") n = "login";
	var xx = "top="+t+",left="+l+",width="+w+ ",height="+h+", directories=0, status=1, scrollbars=1, resizable=1, toolbar=0,menubar=0";
	msgWindow=window.open(x,n,xx);
	msgWindow.focus();
}


/**
/*	Function to sizeUp font
*/
function setFontSize(size, image) {	
	$("div#main").css({fontSize: size+"px"});
	$("li#fontsize/a").css({backgroundImage: image});
	globalize("fontsize", size);
	globalize("fontsizeimage", image);
}

function switchFontSize() {
	if($("div#main").css("fontSize") == "18px") {
		setFontSize(15, 'url(../images/tools/fnt_up.png)');
	} else {
		setFontSize(18, 'url(../images/tools/fnt_down.png)');
	}
}

function recreateFontSize(size, image) {	
	$("div#main").css({fontSize: size+"px"});
	$("li#fontsize/a").css({backgroundImage: image});
}

/**
/*	Function to Globalize Variables
*/
function globalize(_property, _value) {
	new Ajax.Request('/ajax/globalize.jsp', { 
	method:'post',
	parameters: {
		property: _property,
		value: _value		
	},
	onFailure: function(){  }
 });
}
