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 newPlayerWindow(loc,options) {
	var height = options.height || 302;
	var width = options.width || 420; 
	window.open(loc, 'player', 'height='+height+',width='+width+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,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;
    }
}


// jason was here
/* * * VIDEO POPUP * * 
function toggleVideo(){
    //toggle now!
   
    if (document.getElementById('shareblock').style.display == 'block'){
        document.getElementById('vsource').src = 'http://www.google.com';
        document.getElementById('shareblock').style.display = 'none';//disable popflash
        
        document.getElementById('flash_piece').style.display = 'block';//enable main flash
    }else {
        document.getElementById('vsource').src = 'http://216.135.212.230/bayer_diabetes_v3/templates/flash/video.html';
        document.getElementById('flash_piece').style.display = 'none';//disable main flash
        document.getElementById('shareblock').style.display = 'block';//enable pop flsh
    }
}*/