
var the_day=new Date();				
var the_year=the_day.getFullYear();

function blockError(){return true;}

window.onerror = blockError;


var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.availWidth)?Math.floor(Math.random()*(screen.availWidth-w)):50;TopPosition=(screen.availHeight)?Math.floor(Math.random()*((screen.availHeight-h)-75)):50;}
if(pos=="center"){LeftPosition=(screen.availWidth)?(screen.availWidth-w)/2:50;TopPosition=(screen.availHeight)?(screen.availHeight-h)/2:50;}
if(pos=="default"){LeftPosition=170;TopPosition=100}
else if((pos!="center" && pos!="random" && pos!="default") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=yes,directories=no,status=yes,menubar=yes,toolbar=yes,resizable=no';
win=window.open(mypage,myname,settings);
if(win.focus){win.focus();}}

function checkdetails()
{

		if (document.terms.the_box.checked == true) 
		{return true;
  		} else 
		{
    		alert('You must read the User Agreement and agree to the terms and conditions \n\ by checking the box before you can complete your order.');
    	return false;

  		}

	}

function showURL()
{
	var currentURL = window.location;
	var email = document.sendArticle.email.value;
	var name = document.sendArticle.name.value;
	var subject = "Thought You'd Enjoy This";
	var body = "Hey " + name + ", \n\n I was just reading this and thought you'd enjoy it: \n\n" + currentURL + "\n\nLet me know what you thought about it.";

	var url = "mailto:" + email + "?subject=" + subject + "&body=" + body;
	location.href = url;
}
var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
win.focus();}	