


function jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function openCoupon(couponId)
{
	window.open("/coupon.html?coupon=" + couponId ,
	"Coupon");
} 

function clearTextBox(id)
{
	clearTextBox.isCleared = clearTextBox.isCleared || false;
		
	if (clearTextBox.isCleared) return true;
	
	document.getElementById(id).value='';
	
	clearTextBox.isCleared = true;
}


function foo()
{
foo.count = ++foo.count || 1;
alert(foo.count);
}

function cWin(cpn_id)
{
   parent.location = '/coupon_base.html?coupon=' + cpn_id;
}



/*
function cWin(cpn_id)
{
   var host = location.host;
   var pathname = location.pathname;
   var path = '';
   
   var url = '/coupon.html?coupon=' + cpn_id;
      
   var opts = 'width=496, height=400, resizable=no, scrollbars=yes, top=50, left=50';
   
   window.open(path + url, '', opts);
}
*/

function changeParent(url)
{
	if (window.opener)
	{
		if (!window.opener.closed)
		{
			self.opener.location.href = url;
			self.close();
			return true;
		}
		else
		{
			window.open(url);
			return false;
		}
	}
	else
	{
		window.open(url);
		return false;
	}
}


function confirmDelete(name, url)
{
	if (confirm("Are you sure you want to delete " + name + "?")) window.location = url;
}


function verifySubscribe(element)
{
	if (element.name.value == '')
	{
		alert('You must enter your name to subscribe');
		return false;
	}

	if (element.email.value == '')
	{
		alert('You must enter your email address to subscribe');
		return false;
	}

	var x = element.email.value;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!filter.test(x))
	{
		alert('You must enter a valid email address');
		return false;
	}
	
	return true;
	
} // END function - verifySubscribe

function verifyUnSubscribe(element)
{
	if (element.email.value == '')
	{
		alert('You must enter your email address to unsubscribe');
		return false;
	}

	var x = element.email.value;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!filter.test(x))
	{
		alert('You must enter a valid email address');
		return false;
	}

	return true;
	
} // END function - verifyUnSubscribe


function pop(N) {
newWindow = window.open(N, 'popD','toolbar=no,menubar=no,resizable=no,scrollbars=yes,status=no,location=no,width=590,height=500');
}





function tS(){ x=new Date(); x.setTime(x.getTime()); return x; } 
function lZ(x){ return (x>9)?x:'0'+x; } 
function tH(x){ if(x==0){ x=12; } return (x>12)?x-=12:x; } 
function dT(){ if(fr==0){ fr=1; document.write('<span id="tP">'+eval(oT)+'</span>'); } document.getElementById('tP').innerHTML=eval(oT); setTimeout('dT()',1000); } 
function aP(x){ return (x>11)?'pm':'am'; } 
function y4(x){ return (x<500)?x+1900:x; } 
var dN=new Array('Sun.','Mon.','Tues.','Wed.','Thurs.','Fri.','Sat.'),mN=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'),fr=0,oT="dN[tS().getDay()]+','+' '+mN[tS().getMonth()]+' '+tS().getDate()+'. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Current Time - '+'  '+' '+tH(tS().getHours())+':'+lZ(tS().getMinutes())+':'+lZ(tS().getSeconds())+' '+aP(tS().getHours())";