function newWindowLegal(loc)
{
	window.open(loc, 'legal', 'height=440,width=587,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=1,maximize=no');
	return false;
}

function noCodingHelp(loc)
{
	window.open(loc, 'help', 'height=400,width=640,toolbar=0,menubar=0');
	return false;
}

function newWindowStandard(loc)
{
	window.open(loc, 'standard', 'height=400,width=430,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=1,maximize=no');
	return false;
}

 
function popUpCoupon(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=660,height=640');");
}
 
 
function popUpLenny(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=660,height=530');");
}


function popUpenews(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=660,height=640');");
} 



function popUpNick(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300');");
} 
 

// update font size
var min=8;
var max=18;
function setFontSize(size) {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s = size;
      }
      p[i].style.fontSize = s+"px"
   }
}

// update sub menu clickability
function changeSubMenu(str)
{   
    var p = 'http://' + window.location.host + str;

    

    // if not same go
    if (p != window.location.href)
    {
        window.location.href = str;
    }
}
