
var urlAddress = "http://easymoneypage.com/"; 
var pageName = "Easy Money Page"; 

function addToFavorites() 
{ 
	if (window.external) 
	{ 
		window.external.AddFavorite(urlAddress,pageName) 
	} else { 
	alert('Sorry! Your browser doesn\'t support this function.'); 
	} 
} 


	function PopupVideo(url, width, height)
	{
		var l = (screen.width - width) / 2 - 10;
		var t = (screen.height - height) /2 - 10;
		var opts = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=' + width + ',height=' + height + ',top=' +  t + ' ,left=' + l;
		var	name = 'newWin';
		var comwin = window.open(url, name, opts);
		comwin.focus();
	}
	
	function confirm_terms()
	{
		var x = document.getElementById("terms").checked;
	if(x == false)
	{
		alert('You can not proceed without accepting the terms. Please check the box and try again.');
	}else{
	document.make_payment.submit();
	}
	}

	function confirm_terms_2()
	{
		var x = document.getElementById("terms_2").checked;
	if(x == false)
	{
		alert('You can not proceed without accepting the terms. Please check the box and try again.');
	}else{
	document.make_payment_7day.submit();
	}
	}

	function confirm_terms_trial()
	{
		var x = document.getElementById("terms_trial").checked;
	if(x == false)
	{
		alert('You can not proceed without accepting the terms. Please check the box and try again.');
	}else{
	document.trial.submit();
	}
	}

	function confirm_terms_oac()
	{
		var x = document.getElementById("terms_oac").checked;
	if(x == false)
	{
		alert('You can not proceed without accepting the terms. Please check the box and try again.');
	}else{
	document.pay_oac.submit();
	}
	}

	function confirm_inv_type()
	{
		var x = document.getElementById("a_investor").checked;
		var y = document.getElementById("b_investor").checked;
		var z = document.getElementById("b_investor_2").checked;
	if(x == false && y == false && z == false)
	{
		alert('You can not proceed without selecting an investor type. Please select one and try again.');
	}else{
	document.invest.submit();
	}
	}

	function compare_pp()
	{
		var x = document.getElementById("paypal1").value;
		var y = document.getElementById("paypal2").value;
		
	if(x == '' || y == '')
	{
		alert('Please enter your Pay Pal email address to continue.');
		return false
	}
	
	if(x != y && x != '' && y !='')
	{
		alert('The emails you entered don\'t match. Please check them and try again.');
	}else{
	document.submit_paypal.submit();
	}
	}


function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else 
countfield.value = maxlimit - field.value.length;
}


function renderMessage(dateStr, msg1, msg2, countFrom) {
  var date = new Date(dateStr);
  var now = new Date();
  var diff = date.getTime() - now.getTime();
  var days = Math.floor(diff / (1000 * 60 * 60 * 24)) + 1;
  if(days < 1) {
    document.write(msg1);
  } else {
    if(countFrom)
      days = countFrom - days;
    document.write(msg2.replace(/%days%/g, number_format(days)));
  }
}
function number_format(num) {
  num = num.toString().replace(/\$|\,/g,'');
  if(isNaN(num)) {
    num = "0";
  }
  sign = (num == (num = Math.abs(num)));
  num = Math.floor(num*100+0.50000000001);
  num = Math.floor(num/100).toString();
  for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
  num = num.substring(0,num.length-(4*i+3))+','+
  num.substring(num.length-(4*i+3));
  return (((sign)?'':'-') + num);
}
/*
Select and Copy form element script- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
*/

//specify whether contents should be auto copied to clipboard (memory)
//Applies only to IE 4+
//0=no, 1=yes
var copytoclip=1

function HighlightAll(theField) {
    var tempval=eval("document."+theField)
    tempval.focus()
    tempval.select()
    
    if (document.all&&copytoclip==1){
        therange=tempval.createTextRange()
        therange.execCommand("Copy")
        window.status="Contents copied to clipboard"
        setTimeout("window.status=''",1800)
    }
}


