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;
}

// 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;
    }
}
