// default javascript for partners

function textSize(sizeArg) {
	var fullArg = 'textSize='+ (sizeArg != null ? sizeArg:'textMedium');
	if (location.search == "") {
		// let the link go through, no query to spoil
		return true;
	} else if (/textSize/.test(location.search)) {
		// replace the last text size with the current request
		location.search = location.search.replace(/textSize=\w+/,fullArg);
		return false; //technicality
	} else {
		// we need to add the textSize to the query and cancel the link
		location.search = location.search+"&"+fullArg;
		return false; //technicality
	}
}

function popWin(popLink,args) {
	if (screen.availHeight && screen.availWidth) {
		var left = screen.availWidth/2-300;
		var top = screen.availHeight/2-205;
	} else {
		var left = 10;
		var top = 10;
	}
	var wArgs = args != null ? args:"width=600,height=410,status,resizable,scrollbars,menubar,top="+top+",left="+left;
	var targ = popLink.target != '' ? popLink.target : '_blank';
	var newWin = window.open(popLink.href,targ,wArgs);
	newWin.focus();
	return false;
}