// JavaScript Document
//  <script language="javascript">
  function extractHREF(juju)
  {
    
	var aSourceHTML = juju;
	var aResultField;
	regexp=/href\s*=\s*\+*[^\+>]*/ig;
	var vArray = aSourceHTML.match(regexp);
	try {
		var vLinks = vArray[0].replace(/href\s*=\s*\+*/g,"");
		return vLinks;
	    //document.write('Loading Deal...........');
		//window.location.href(vLinks);
	
		}
	catch(e)
	{
		vLinks = "";		
		return vLinks;
	}		
				
 }
 
  function extractURL(juju)
  {
    
	var aSourceHTML = juju;
	var aResultField;
	regexp=/href\s*=\s*\+*[^\+>]*/ig;
	var vArray = aSourceHTML.match(regexp);
	try {
		var vLinks = vArray[0].replace(/href\s*=\s*\+*/g,"");
		return vLinks;
	    //document.write('Loading Deal...........');
		window.location.href(vLinks);
	
		}
	catch(e)
	{
		vLinks = "";		
		return vLinks;
	}		
				
 } 

  function couponwin(jojo, momo)
  {     

  	var couponcode = jojo;
	var dealtitle = momo;
    if (couponcode != 'coupon' && couponcode != 'n/a' && couponcode != 'link' && couponcode != 'internal')
	{
  	OpenWindow=window.open("", "newwin", "height=200, width=250,toolbar=no,scrollbars="+scroll+",menubar=no");
	OpenWindow.document.write("<HTML>");
	OpenWindow.document.write("<HEAD>");
	OpenWindow.document.write("<TITLE>Coupon Code</TITLE>");
	OpenWindow.document.write("<link rel='STYLESHEET' type='text/css' href='/css/sale.css'>");
	OpenWindow.document.write("</HEAD>");	
	OpenWindow.document.write("<BODY topmargin=5 leftmargin=5 rightmargin=5>");
	OpenWindow.document.write("<table width=100% height=100%  border=0 cellpadding=0 cellspacing=5 bgcolor=#d2e4ff><tr><td height=20><h3>Saletastic!</h3></td></tr><tr><td align=left height=10><u>");
	OpenWindow.document.write(dealtitle);
	OpenWindow.document.write('</u></td></tr><tr><td align=left height=10>');
	OpenWindow.document.write("Coupon Code:&nbsp;&nbsp;");
	OpenWindow.document.write("<strong>");
	OpenWindow.document.write(couponcode);
	OpenWindow.document.write("</strong></td></tr><tr><td height=20>Write Down or Copy & Paste This Coupon Code During Checkout To Get The Discount.</td></tr><tr><td height=10><span class=small>&nbsp;Please verify discount is applied before completing your order.</small></td></tr></table>");
	OpenWindow.document.write("</BODY>");
	OpenWindow.document.write("</HTML>");
	OpenWindow.document.close();
	OpenWindow.focus();
	};

    if (couponcode == 'coupon')
	{
  	OpenWindow=window.open("", "newwin", "height=200, width=250,toolbar=no,scrollbars="+scroll+",menubar=no");
	OpenWindow.document.write("<HTML>");
	OpenWindow.document.write("<HEAD>");
	OpenWindow.document.write("<TITLE>Coupon Code</TITLE>");
	OpenWindow.document.write("<link rel='STYLESHEET' type='text/css' href='/css/sale.css'>");
	OpenWindow.document.write("</HEAD>");	
	OpenWindow.document.write("<BODY topmargin=5 leftmargin=5 rightmargin=5>");
	OpenWindow.document.write("<table width=100% height=100%  border=0 cellpadding=0 cellspacing=0 bgcolor=#d2e4ff><tr><td height=20><h3>Saletastic!</h3></td></tr><tr><td align=left height=10>&nbsp;<u>");
	OpenWindow.document.write(dealtitle);
	OpenWindow.document.write('</u></td></tr><tr><td align=left height=10>&nbsp;');
	OpenWindow.document.write("Coupon Code:&nbsp;&nbsp;");
	OpenWindow.document.write("<strong>");
	OpenWindow.document.write('None Required.');
	OpenWindow.document.write("</strong></td></tr><tr><td height=20>Coupon Discount Is Automatically Applied During Checkout. No Special Code is Required.</td></tr><tr><td height=10><span class=small>&nbsp;Please verify discount is applied before completing your order.</small></td></tr></table>");
	OpenWindow.document.write("</BODY>");
	OpenWindow.document.write("</HTML>");
	OpenWindow.document.close();
	OpenWindow.focus();
	};
	
    if (couponcode == 'link')
	{
  	OpenWindow=window.open("", "newwin", "height=200, width=250,toolbar=no,scrollbars="+scroll+",menubar=no");
	OpenWindow.document.write("<HTML>");
	OpenWindow.document.write("<HEAD>");
	OpenWindow.document.write("<TITLE>Coupon Code</TITLE>");
	OpenWindow.document.write("<link rel='STYLESHEET' type='text/css' href='/css/sale.css'>");
	OpenWindow.document.write("</HEAD>");	
	OpenWindow.document.write("<BODY topmargin=5 leftmargin=5 rightmargin=5>");
	OpenWindow.document.write("<table width=100% height=100%  border=0 cellpadding=0 cellspacing=0 bgcolor=#d2e4ff><tr><td height=20><h3>Saletastic!</h3></td></tr><tr><td align=left height=10>&nbsp;<u>");
	OpenWindow.document.write(dealtitle);
	OpenWindow.document.write('</u></td></tr><tr><td align=left height=10>&nbsp;');
	OpenWindow.document.write("Coupon Code:&nbsp;&nbsp;");
	OpenWindow.document.write("<strong>");
	OpenWindow.document.write('None Required.');
	OpenWindow.document.write("</strong></td></tr><tr><td height=20>Coupon Discount Is Automatically Applied During Checkout. No Special Code is Required.</td></tr><tr><td height=10><span class=small>&nbsp;Please verify discount is applied before completing your order.</small></td></tr></table>");
	OpenWindow.document.write("</BODY>");
	OpenWindow.document.write("</HTML>");
	OpenWindow.document.close();
	OpenWindow.focus();
	};
	
	
  }  
  
  function couponlinkwin(i, m, t, u, d)
  {     

	var id = i;
	var merchant = m;
  	var type = t;
	var url = u;
	var desc = d;
	
  	OpenWindow=window.open("couponwin.asp?dealid="+i+"&merchant="+merchant+"&type="+type+"&url="+url+"&desc="+desc+"" , "newwin", "top=0, left=0, height=250, width=250,toolbar=no,scrollbars="+scroll+",menubar=no");
	return true;
	
  } 
  
  function stat_write(yourtext)
  {
     window.status=yourtext;
  }


//  <script>
