function fnTextSize(textSize) {											
	document.body.className = textSize;			
	var menuLinks = document.getElementById("menu").getElementsByTagName("A");
	for(i=0;i<menuLinks.length;i++) {
		menuLinks[i].href = menuLinks[i].href.split("?")[0]+"?tSize="+textSize;
	}			
} 

function fnPrint() {	
	window.print();			
}

function fnBodyId(newID) {	
	document.body.id = newID;		
}

function preview()
{
//alert("hello");
document.forms.refer_a_friend.preview.value= 'yes';
document.forms.refer_a_friend.submit();
}

function confirm()
{
document.forms.refer_a_friend.submit();
}

// Popup
function fnPopUp(filePath,height,width,attributes){
	var sScreenX = screen.width
	var sScreenY = screen.height
	var x = sScreenX - width
	var y = sScreenY - height
	var winLeft = x/2
	var winTop =  y/2 
	window.open(filePath,"","width=" + width + ",height=" + height + "," + attributes + ",left=" + winLeft + ",top=" + winTop)
}

// Popup
function openWindow(url,width,height) {
x = (640 - width)/2, y = (480 - height)/2;
if (screen) {
y = (screen.availHeight - height)/2;
x = (screen.availWidth - width)/2;
}
window.open (url,'newWin','scrollbars=yes,width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x+'');
}


// Make <a openin="newwindow"> equiv to <a target="_blank"> but compliant with XHTML 1.1
// To be called when window has loaded
// Neil Burgess 2007
var makeATargetBlank = function() {
	eles = document.getElementsByTagName("a");
	for (var count=0; count < eles.length; count++) {
		if (eles[count].className.match(/newwindow/)) {
			document.getElementsByTagName("a")[count].onclick = function(){window.open(this.href); return false;};
		}
	}
}

function openinnewwindow(location) {
	window.open(location);
	return false;
}

//Rounded corners
var makeRound = function(){
	var els = document.getElementsByTagName('div'); 
	for(var i=0; el=els[i]; i++){
		if(el.className.indexOf('round')>-1 && el.firstChild && el.firstChild.className!='t') el.innerHTML = '<b class="t"><b class="r"></b></b><div class="c"><b class="br"></b>'+el.innerHTML+'<b class="br"></b></div><b class="b"><b class="r"><!----></b></b>';
	}
}
//window.onload = makeRound;



var windowloaded = function(){
	// Function to be called when page has finished loading
	// Neil Burgess 2007

	if (navigator.appName=="Microsoft Internet Explorer") {
		//makeRound();
	}
	makeATargetBlank();
}

window.onload = windowloaded;
