// JavaScript Document

function no(){}


function PopUp(theURL,winName,features) { //v2.0
  popwin = window.open(theURL,winName,features);
  popwin.focus();
}

function openLogin(){
	if ($("#logincontainer:first").is(":hidden")) {
		$("#logincontainer").slideDown("slow");
	} else {
		$("#logincontainer").slideUp("slow");
	}
};

function loginbox(){
	window.loginbox1.style.display='none';
	window.loginbox2.style.display='block';
}


function deleteConfirm(del){
	if (
		confirm("Are you sure you wish to permanently delete this item?\n\nOK = Yes - Cancel = No")){ 
		window.location=del;
	}
}

function textsize(size){

	if(size == 1){
		document.getElementById('content').style.fontSize = 'small';
	}
	if(size == 2){
		document.getElementById('content').style.fontSize = 'medium';
	}
	if(size == 3){
		document.getElementById('content').style.fontSize = 'large';
	}
	SetCookie('textsize', size, 30);
}

function SetCookie(cookieName,cookieValue,nDays) {
 var today = new Date();
 var expire = new Date();
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString();
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
