function x10Deals(){
this.PID=null;
this.SID=null;
this.AID=null;
this.EXITPOP=false;

this.EXITPOPSKU=null;

this.decache = new Date();
	this.CAMPAIGN="bGNqYnV5bm93LmRhd";
	this.TRACKPixel="Z2NqanN0cmsuZGF0=";

	//STANDARD DATA
	this.x10ItemNumber="33753";
 this.x10SKU="DS7000-SC";
	this.x10ItemProductName="Protector Plus Security System";
	this.x10ItemPrice="99.99";
	this.x10ItemSavings="79.95";
	this.x10ItemSeparate="179.94";
	this.x10ItemGraphic="http://graphics.x10.com/images12/ds7000_ne.gif";
	this.x10ItemRedTag="";
	this.x10Items=new Array("Protector Plus Security System");
	this.x10ItemsPrices=new Array("99.99");
	this.x10FreeItems=new Array();
	this.x10FreeItemsPrices=new Array();
	this.ButtonImg = "http://graphics.x10.com/images_buttons/order5.gif";

	//UPSELL DATA
	this.x10UpSellItemNumber="";
 this.x10UpSellSKU="";
	this.x10UpSellItemProductName="";
	this.x10UpSellItemPrice="";
	this.x10UpSellItemSavings="";
	this.x10UpSellItemSeparate="";
	this.x10UpSellItemGraphic="";
	this.x10UpSellItemRedTag="";
	this.x10UpSellItems=new Array();
	this.x10UpSellItemsPrices=new Array();
	this.x10UpSellFreeItems=new Array();
	this.x10UpSellFreeItemsPrices=new Array();
	this.UpSellButtonImg = "";
 
//STANDARD FUNCTION
this.getName=getName;
this.getPrice=getPrice;
this.getItems=getItems;
this.getSavings=getSavings;
this.getSeparate=getSeparate;
this.getItemsTable=getItemsTable;
this.getFreeItems=getFreeItems;
this.getFreeItemsTable=getFreeItemsTable;
this.getGraphic=getGraphic;
this.getRedTag=getRedTag;
this.getTextLink=getTextLink;
this.getOrderButton=getOrderButton;

//UPSELL FUNCTION
this.getUpSellName=getUpSellName;
this.getUpSellPrice=getUpSellPrice;
this.getUpSellItems=getUpSellItems;
this.getUpSellSavings=getUpSellSavings;
this.getUpSellSeparate=getUpSellSeparate;
this.getUpSellItemsTable=getUpSellItemsTable;
this.getUpSellFreeItems=getUpSellFreeItems;
this.getUpSellFreeItemsTable=getUpSellFreeItemsTable;
this.getUpSellGraphic=getUpSellGraphic;
this.getUpSellRedTag=getUpSellRedTag;
this.getUpSellTextLink=getUpSellTextLink;
this.getUpSellOrderButton=getUpSellOrderButton;

this.getSupportButton=getSupportButton;
this.getInclude=getInclude;
this.getPhoneNumber=getPhoneNumber;
this.submitOrder=submitOrder;
this.getFlash=getFlash;
this.getExitPop=getExitPop;
this.EnableExitPop=EnableExitPop;
this.checkInfo=checkInfo;

//email a friend
this.ReferFriend=ReferFriend;
this.ReferFriendButton=ReferFriendButton;
this.ReferFriendImage= "http://graphics.x10.com/images_buttons/button2_sendfriend_rh.gif";

}
// This Function is for checking the affiliates
function checkInfo() {

	
	if( ( ( ! CJ.AID ) || ( ! CJ.PID ) ) && ( ! CJ.ERROR ) ) {
		
		//Alert the Affiliate that they have and error	
		alert( "X10 Affiliates Network Error: Affiliate ID / Publisher ID not included.\n\nPlease contact X10 Affiliates Network at (888)590-2763 or affiliates@x10.com\nto resolve this problem immediately.\n" );
		
		// Set error flag so this message doesn't repeat
		CJ.ERROR = 1;
		
	}
	return 1;
	
}// checkInfo()

//EXIT POP UP CODE
function getExitPop() {
	if( CJ.EXITPOP ) {

var name = "http://affiliates.x10.com/affiliates/cj_"+CJ.EXITPOPSKU.toLowerCase()+".htm?PID="+CJ.PID+"&AID="+CJ.AID+"&SID=EXITPOP_"+CJ.SID;
window.open(name,"CJEXITPOP","width=460,height=600,titlebar=1,toolbar=1,location=1,menubar=1,scrollbars=1,resizable=1,status=1");

	}


	return 1;

}
function EnableExitPop(sku) {
	
	if(sku) {
		
		this.EXITPOP=true;
		
		this.EXITPOPSKU=sku;
		
	}
	
	return 1;
	
}

//SUPPORT BUTTON FUNCTION
function getSupportButton() {
document.write('<script lanuage="javascript" src="http://affiliates.x10.com/scripts/supportbutton.js"></scr'+''+'ipt>');

	return 1;

}

//DUP VIRTUAL INCLUDES
function getInclude(desc) {

	var data = eval("this.x10"+desc);

	if(data) {

		document.write(data);

	} else {

		document.write("Not Available");

	}
	
	return 1;

}
function getPhoneNumber() {
document.write('Order online or call anytime 888-570-4964<BR> Don\'t forget to mention the promotion code: <B>'+this.PID+'</B>');

	return 1;

}
function getName(){

	if(this.x10ItemProductName) {

		document.write(this.x10ItemProductName);

	} else {

		document.write("Not Available");

	}
	
	return 1;
	
}

function getPrice(){
	
	if(this.x10ItemPrice) {
		
		document.write("$"+this.x10ItemPrice);
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
	
}
function getSavings(){
	
	if(this.x10ItemSavings) {
		
		document.write("$"+this.x10ItemSavings);
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
	
}
function getSeparate(){
	
	if(this.x10ItemSeparate) {
		
		document.write("$"+this.x10ItemSeparate);
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
	
}
function getGraphic(){
	
	if(this.x10ItemGraphic) {
		
		this.getOrderButton(this.x10ItemGraphic);
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
	
}
function getRedTag(){
	
	if(this.x10ItemRedTag) {
		
		this.getOrderButton(this.x10ItemRedTag);
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
	
}
function getItems(){
	
	if(this.x10Items.length>0) {
		
		for(x=0;x<this.x10Items.length;x++){
			
			var tmp = this.x10Items[x].replace(/FREE/g,"<FONT COLOR=RED>FREE</FONT>");
			
			document.write(tmp+"<BR>");
			
		}
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
	
}
function getItemsTable(){
	
	if(this.x10Items.length>0) {
		
		document.write("<table width=100% border=0 cellspacing=0>");
		
		for(x=0;x<this.x10Items.length;x++) {
			
			var tmp = this.x10Items[x].replace(/FREE/g,"<FONT COLOR=RED SIZE=2>FREE</FONT>");
			
			document.write("<tr><td><font size=2><B>"+tmp+"</B></font></td><td align=right><font size=2><B>$"+this.x10ItemsPrices[x]+"</B></font></td></tr>");
			
		}
		
		if(parseFloat(this.x10ItemPrice) >= 49.99){
			
			document.write("<tr><td><B><FONT COLOR=RED SIZE=2>FREE</FONT> <font size=2>FedEx Shipping</font></B></td><td align=right><font size=2><B><I>Always free!</I></B></font></td></tr>");
			
		}
		
		document.write("</table>");
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
	
}
function getFreeItems(){
	
	if(this.x10FreeItems.length>0) {
		
		for(x=0;x<this.x10FreeItems.length;x++){
			
			var tmp = this.x10FreeItems[x].replace(/FREE/g,"<FONT COLOR=RED>FREE</FONT>");
			
			document.write("<B>"+tmp+"</B><BR>");
			
		}
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
}
function getFreeItemsTable(){
	
	if(this.x10FreeItems.length>0) {
		
		document.write("<table width=100% border=0 cellspacing=0>");
		
		for(x=0;x<this.x10FreeItems.length;x++) {
			
			var tmp = this.x10FreeItems[x].replace(/FREE/g,"<FONT COLOR=RED size=2>FREE</FONT>");
			
			document.write("<tr><td><font size=2><B>"+tmp+"</B></font></td><td align=right><font size=2><B>$"+this.x10FreeItemsPrices[x]+"</font></B></td></tr>");
			
		}
		
		if(parseFloat(this.x10ItemPrice) >= 49.99){
			
			document.write("<tr><td><B><FONT COLOR=RED size=2>FREE</FONT> <font size=2>FedEx Shipping</font></B></td><td align=right><font size=2><B><I>Always free!</I></B></font></td></tr>");
			
		}
		
		document.write("</table>");
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;

}
function getOrderButton(img){
	
	var graphic = "";

	if(img != null) {
		graphic = img
	}
	else {
		graphic = this.ButtonImg;
	}
	
	if(this.x10ItemNumber) {

		if(this.PID != null && this.AID != null) {
			
			if(this.SID != null){
				
				if(!img) {
					
					document.write('<table border=0 cellpadding=0 cellspacing=0><tr><td>');
					
				}

				document.write('<a onclick="CJ.EXITPOP=false;" href="http://www.jdoqocy.com/click-'+this.PID+'-'+this.AID+'?sid='+this.SID+'&url=http%3A//ads.x10.com/%3F'+this.CAMPAIGN+'%3D'+this.decache.getTime()+'%7C'+this.AID+'-'+this.PID+'-'+this.SID+'%26ITEM%3Ditem%3A'+this.x10ItemNumber+'"><img src="'+graphic+'" border=0></a><img src="http://ads.x10.com/?'+this.TRACKPixel+'='+this.decache.getTime()+'|'+this.AID+'-'+this.PID+'-'+this.SID+'" width=1 height=1>');
				
				if(!img) {
					
					document.write('</td></tr><tr><td align=center>');
					document.write('<font type="Arial" size="1">');
					document.write('<a href="#" onclick="CJ.EXITPOP=false;window.open(\'http://www.x10.com/cgi-bin/cj_viewparts.cgi?sku='+this.x10SKU+'&PID='+this.PID+'&AID='+this.AID+'&SID='+this.SID+'&CAMP='+this.CAMPAIGN+'&ITEMNUM='+this.x10ItemNumber+'\',\'38065\',\'width=500,height=500,resizable=1,scrollbars=1\');">');
					document.write('What\'s Included');
					document.write('</a>');
					document.write('</font>');
					document.write('</td></tr></table>');
					
				}
				
			} else {
			
				if(!img) {
				
					document.write('<table border=0 cellpadding=0 cellspacing=0><tr><td>');
				
				}
				
				document.write('<a onclick="CJ.EXITPOP=false;" href="http://www.jdoqocy.com/click-'+this.PID+'-'+this.AID+'?sid=&url=http%3A//ads.x10.com/%3F'+this.CAMPAIGN+'%3D'+this.decache.getTime()+'%7C'+this.AID+'-'+this.PID+'-%26ITEM%3Ditem%3A'+this.x10ItemNumber+'"><img src="'+graphic+'" border=0></a><img src="http://ads.x10.com/?'+this.TRACKPixel+'='+this.decache.getTime()+'|'+this.AID+'-'+this.PID+'-'+this.SID+'" width=1 height=1>');

				if(!img) {
					
					document.write('</td></tr><tr><td align=center>');
					document.write('<font type="Arial" size="1">');
					document.write('<a href="#" onclick="CJ.EXITPOP=false;window.open(\'http://www.x10.com/cgi-bin/cj_viewparts.cgi?sku='+this.x10SKU+'&PID='+this.PID+'&AID='+this.AID+'&SID='+this.SID+'&CAMP='+this.CAMPAIGN+'&ITEMNUM='+this.x10ItemNumber+'\',\'38065\',\'width=500,height=500,resizable=1,scrollbars=1\');">');
					document.write('What\'s Included');
					document.write('</a>');
					document.write('</font>');
					document.write('</td></tr></table>');
					
				}
				
			}

		} else {
			
			CJ.checkInfo();
			
			document.write('<a onclick="CJ.EXITPOP=false;" href="javascript:X10.submitOrder('+this.x10ItemNumber+',0);"><img src="'+graphic+'" border=0></a><img src="http://ads.x10.com/?'+this.TRACKPixel+'='+this.decache.getTime()+'|'+this.AID+'-'+this.PID+'-'+this.SID+'" width=1 height=1>');
			
		}
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
	
}
function getTextLink(text){
	
	if(this.x10ItemNumber) {

		if(this.PID != null && this.AID != null) {
			
			if(this.SID != null){
				
				document.write('<a onclick="CJ.EXITPOP=false;" href="http://www.jdoqocy.com/click-'+this.PID+'-'+this.AID+'?sid='+this.SID+'&url=http%3A//ads.x10.com/%3F'+this.CAMPAIGN+'%3D'+this.decache.getTime()+'%7C'+this.AID+'-'+this.PID+'-'+this.SID+'%26ITEM%3Ditem%3A'+this.x10ItemNumber+'">'+text+'</a>');
			
			} else {
				
				document.write('<a onclick="CJ.EXITPOP=false;" href="http://www.jdoqocy.com/click-'+this.PID+'-'+this.AID+'?sid=&url=http%3A//ads.x10.com/%3F'+this.CAMPAIGN+'%3D'+this.decache.getTime()+'%7C'+this.AID+'-'+this.PID+'-%26ITEM%3Ditem%3A'+this.x10ItemNumber+'">'+text+'</a>');
				
			}
			
		} 
		
		else {
			
			CJ.checkInfo();
			
			document.write('<a onclick="CJ.EXITPOP=false;" href="javascript:CJ.submitOrder('+this.x10ItemNumber+',0);">'+text+'</a>');
			
		}
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
	
}
//UPSELL FUNCTION
function getUpSellName(){
	
	if(this.x10UpSellItemProductName) {
		
		document.write(this.x10UpSellItemProductName);
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
	
}
function getUpSellPrice(){

	if(this.x10UpSellItemPrice) {

		document.write("$"+this.x10UpSellItemPrice);

	} else {

		document.write("Not Available");

	}

	return 1;

}
function getUpSellSavings(){
	
	if(this.x10UpSellItemSavings) {
		
		document.write("$"+this.x10UpSellItemSavings);
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
	
}
function getUpSellSeparate(){
	
	if(this.x10UpSellItemSeparate) {
		
		document.write("$"+this.x10UpSellItemSeparate);
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
	
}
function getUpSellGraphic(){
	
	if(this.x10UpSellItemGraphic) {
		
		this.getUpSellOrderButton(this.x10UpSellItemGraphic);

	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;

}
function getUpSellRedTag(){
	
	if(this.x10UpSellItemRedTag) {
		
		this.getUpSellOrderButton(this.x10UpSellItemRedTag);
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;

}
function getUpSellItems(){
	
	if(this.x10UpSellItems.length>0) {
		
		for(x=0;x<this.x10UpSellItems.length;x++){
			
			var tmp = this.x10UpSellItems[x].replace(/FREE/g,"<FONT COLOR=RED>FREE</FONT>");
			
			document.write(tmp+"<BR>");
			
		}
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
	
}
function getUpSellItemsTable(){
	
	if(this.x10UpSellItems.length>0) {
		
		document.write("<table width=100% border=0 cellspacing=0>");
		
		for(x=0;x<this.x10UpSellItems.length;x++) {
			
			var tmp = this.x10UpSellItems[x].replace(/FREE/g,"<FONT COLOR=RED size=2>FREE</FONT>");
			
			document.write("<tr><td><font size=2><B>"+tmp+"</B></font></td><td align=right><font size=2><B>$"+this.x10UpSellItemsPrices[x]+"</font></B></td></tr>");
			
		}
		
		if(parseFloat(this.x10UpSellItemPrice) >= 49.99){
			
			document.write("<tr><td><B><FONT COLOR=RED size=2>FREE</FONT> <font size=2>FedEx Shipping</font></B></td><td align=right><font size=2><B><I>Always free!</I></B></font></td></tr>");
			
		}
		
		document.write("</table>");
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
	
}
function getUpSellFreeItems(){
	
	if(this.x10UpSellFreeItems.length>0) {
		
		for(x=0;x<this.x10UpSellFreeItems.length;x++){
			
			var tmp = this.x10UpSellFreeItems[x].replace(/FREE/g,"<FONT COLOR=RED size=2>FREE</FONT>");
			
			document.write(tmp+"<BR>");
			
		}
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
	
}
function getUpSellFreeItemsTable(){
	
	if(this.x10UpSellFreeItems.length>0) {
		
		document.write("<table width=100% border=0 cellspacing=0>");
		
		for(x=0;x<this.x10UpSellFreeItems.length;x++) {
			
			var tmp = this.x10UpSellFreeItems[x].replace(/FREE/g,"<FONT COLOR=RED size=2>FREE</FONT>");
			
			document.write("<tr><td><font size=2><B>"+tmp+"</B></font></td><td align=right><font size=2><B>$"+this.x10UpSellFreeItemsPrices[x]+"</B></font></td></tr>");
			
		}
		
		if(parseFloat(this.x10UpSellItemPrice) >= 49.99){
			
			document.write("<tr><td><B><FONT COLOR=RED size=2>FREE</FONT> <font size=2>FedEx Shipping</font></B></td><td align=right><font size=2><B><I>Always free!</I></B></font></td></tr>");
			
		}
		
		document.write("</table>");
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
	
}
function getUpSellOrderButton(img){
	
	var graphic = "";
	
	if(img != null) {
		
		graphic = img
		
	} else {
		
		graphic = this.UpSellButtonImg;
		
	}
	
	if(this.x10UpSellItemNumber) {
		
		if(this.PID != null && this.AID != null) {
			
			if(this.SID != null){
				
				if(!img) {
					
					document.write('<table border=0 cellpadding=0 cellspacing=0><tr><td>');
					
				}
				
				document.write('<a onclick="CJ.EXITPOP=false;" href="http://www.jdoqocy.com/click-'+this.PID+'-'+this.AID+'?sid='+this.SID+'&url=http%3A//ads.x10.com/%3F'+this.CAMPAIGN+'%3D'+this.decache.getTime()+'%7C'+this.AID+'-'+this.PID+'-'+this.SID+'%26ITEM%3Ditem%3A'+this.x10UpSellItemNumber+'"><img src="'+graphic+'" border=0></a><img src="http://ads.x10.com/?'+this.TRACKPixel+'='+this.decache.getTime()+'|'+this.AID+'-'+this.PID+'-'+this.SID+'" width=1 height=1>');

				if(!img) {
					
					document.write('</td></tr><tr><td align=center>');
					document.write('<font type="Arial" size="1">');
					document.write('<a href="#" onclick="CJ.EXITPOP=false;window.open(\'http://www.x10.com/cgi-bin/cj_viewparts.cgi?sku='+this.x10UpSellSKU+'&PID='+this.PID+'&AID='+this.AID+'&SID='+this.SID+'&CAMP='+this.CAMPAIGN+'&ITEMNUM='+this.x10UpSellItemNumber+'\',\'38065\',\'width=500,height=500,resizable=1,scrollbars=1\');">');
					document.write('What\'s Included');
					document.write('</a>');
					document.write('</font>');
					document.write('</td></tr></table>');
					
				}
	
			} else {
				
				if(!img) {
					
					document.write('<table border=0 cellpadding=0 cellspacing=0><tr><td>');
					
				}

				document.write('<a onclick="CJ.EXITPOP=false;" href="http://www.jdoqocy.com/click-'+this.PID+'-'+this.AID+'?sid=&url=http%3A//ads.x10.com/%3F'+this.CAMPAIGN+'%3D'+this.decache.getTime()+'%7C'+this.AID+'-'+this.PID+'-%26ITEM%3Ditem%3A'+this.x10UpSellItemNumber+'"><img src="'+graphic+'" border=0></a><img src="http://ads.x10.com/?'+this.TRACKPixel+'='+this.decache.getTime()+'|'+this.AID+'-'+this.PID+'-'+this.SID+'" width=1 height=1>');

				if(!img) {
					document.write('</td></tr><tr><td align=center>');
					document.write('<font type="Arial size="1">');
					document.write('<a href="#" onclick="CJ.EXITPOP=false;window.open(\'http://www.x10.com/cgi-bin/cj_viewparts.cgi?sku='+this.x10UpSellSKU+'&PID='+this.PID+'&AID='+this.AID+'&SID='+this.SID+'&CAMP='+this.CAMPAIGN+'&ITEMNUM='+this.x10UpSellItemNumber+'\',\'38065\',\'width=500,height=500,resizable=1,scrollbars=1\');">');
					document.write('What\'s Included');
					document.write('</a>');
					document.write('</font>');
					document.write('</td></tr></table>');
				}
			}
		}

		 else {
			
			CJ.checkInfo();
			
			document.write('<a onclick="CJ.EXITPOP=false;" href="javascript:CJ.submitOrder('+this.x10UpSellItemNumber+',0);"><img src="'+graphic+'" border=0></a><img src="http://ads.x10.com/?'+this.TRACKPixel+'='+this.decache.getTime()+'|'+this.AID+'-'+this.PID+'-'+this.SID+'" width=1 height=1>');
			
		}
		
	} else {
		
		document.write("Not Available");
		
	}
	
	return 1;
	
}
function getUpSellTextLink(text){

	if(this.x10UpSellItemNumber) {

		if(this.PID != null && this.AID != null) {
			
			if(this.SID != null){
				
				document.write('<a onclick="CJ.EXITPOP=false;" href="http://www.jdoqocy.com/click-'+this.PID+'-'+this.AID+'?sid='+this.SID+'&url=http%3A//ads.x10.com/%3F'+this.CAMPAIGN+'%3D'+this.decache.getTime()+'%7C'+this.AID+'-'+this.PID+'-'+this.SID+'%26ITEM%3Ditem%3A'+this.x10UpSellItemNumber+'">'+text+'</a>');
				
			} else {
				
				document.write('<a onclick="CJ.EXITPOP=false;" href="http://www.jdoqocy.com/click-'+this.PID+'-'+this.AID+'?sid=&url=http%3A//ads.x10.com/%3F'+this.CAMPAIGN+'%3D'+this.decache.getTime()+'%7C'+this.AID+'-'+this.PID+'-%26ITEM%3Ditem%3A'+this.x10UpSellItemNumber+'">'+text+'</a>');
				
			}
			
		}
 		else {
			
			CJ.checkInfo();
			
			document.write('<a onclick="CJ.EXITPOP=false;" href="javascript:CJ.submitOrder('+this.x10UpSellItemNumber+',0);">'+text+'</a>');

		}
	} else {

		document.write("Not Available");

	}
	
	return 1;

}
//UTILS
function submitOrder(szItem,iHref){ 

	if (iHref == 1) {

		window.location = "http://affiliates.x10.com/?"+this.CAMPAIGN+"="+this.decache.getTime()+"|href:"+szItem;

	} else if (document.cookie != "" && this.CAMPAIGN != "") {

		window.location = "http://affiliates.x10.com/?"+this.CAMPAIGN+"="+this.decache.getTime()+"|item:"+szItem;

	} else {

		window.location = "http://store.x10.com/cgi-bin/sb/order.cgi?storeid=x10merchant&dbname=products&itemnum="+szItem+"&function=add";

	} 	
	
	return 1;

}
function getFlash() {

	document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0\" id=\"showtime_play\" width=\"428\" height=\"35\"><param name=\"_cx\" value=\"14049\"><param name=\"_cy\" value=\"7197\"><param name=\"FlashVars\" value><param name=\"Movie\" value=\"http://ads.x10.com/flash2/xcam2_countdown_cj.swf\"><param name=\"Src\" value=\"http://ads.x10.com/flash2/xcam2_countdown_cj.swf\"><param name=\"WMode\" value=\"Window\"><param name=\"Play\" value=\"-1\"><param name=\"Loop\" value=\"-1\"><param name=\"Quality\" value=\"High\"><param name=\"SAlign\" value><param name=\"Menu\" value=\"0\"><param name=\"Base\" value><param name=\"AllowScriptAccess\" value=\"always\"><param name=\"Scale\"value=\"ShowAll\"><param name=\"DeviceFont\" value=\"0\"><param name=\"EmbedMovie\" value=\"0\"><param name=\"BGColor\" value=\"FFFFFF\"><param name=\"SWRemote\" value><param name=\"MovieData\" value><embed name=\"showtime_play\" src=\"http://ads.x10.com/flash2/xcam2_countdown_cj.swf\" menu=\"false\" quality=\"high\" bgcolor=\"#000000\" width=\"428\" height=\"35\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"></object>");

}
function ReferFriendButton( img ) {
	
	if( ! img ) {
		
		img = this.ReferFriendImage;
		
	}
	

document.write("<a href=\"javascript:CJ.ReferFriend();\"><img src=\""+img+"\" border=\"0\"></a>");
}

//ReferFriendButton()
function ReferFriend() {

	var url = location.href;
	var html = "";
	var win = "";
	
	html += "<html>n";
	html += "<title>Refer A Friend</title>n";
	html += "<head>n";
	html += "<script type=\"text/javascript\" language=\"JavaScript\">\n";
	html += "function addItemToList(){";
	html += "	var list = document.form1.list;";
	html += "	var len = list.options.length;";
	html += "	var newValue = \"\";";
	html += "	var newOption = \"\";";
	html += "	var newOptions = \"\";";
	html += "	if( len < 0 ){";
	html += "		len = 0;";
	html += "	}";
	html += "	if(document.form1.friend.value) {";
	html += "		newOption = document.form1.friend.value;";
	html += "		newValue = document.form1.friend.value;";
	html += "	}";
	html += "	newOptions = new Option(newOption,newValue);";
	html += "	list.options[len] = newOptions;";
	html += "	for( x = 1 ; x < list.options.length ; x++ ) {";
	html += "		list.options[x].selected = 1;";
	html += "	}";
	html += "	document.form1.friend.value = \"\";";
	html += "}";
	html += "function removeItemFromList(){";
	html += " 	var list = document.form1.list;";
	html += "	var num = list.selectedIndex;";
	html += "	var item = \"\";";
	html += "	var itemop = \"\";";
	html += "	var tempArray = new Array();";
	html += "	if( num != -1 ) {";
	html += "		item = list.options[num].value;";
	html += "		itemop = list.options[num].text;";
	html += "		list.options[num].value = \"\";";
	html += "		list.options[num].text = \"\";";
	html += "		for(var i = 0; i < list.options.length; i++) {";
	html += "			if(list.options[i].value){";
	html += "				tempArray.push(list.options[i].value);";
	html += "				}";
	html += "		}";
	html += "		if(tempArray){";
	html += "			list.options.length = 0;";
	html += "			for(var i = 0; i < tempArray.length; i++){";
	html += "				var newValue = tempArray[i];";
	html += "				var newOption = tempArray[i];";
	html += "				var newOptions = new Option(newOption,newValue);";
	html += "				list.options[i] = newOptions;";
	html += "			}";
	html += "		} else {";
	html += "			list.options.length = 0;";
	html += "			for( x = 1 ; x < list.options.length ; x++ ) {";
	html += "				list.options[x].selected = 1;";
	html += "			}";
	html += "		}";
	html += "	} else {";
	html += "		alert( \"Please select an address to remove\" );";
	html += "	}";
	html += "}";
	html += "</scr"+"ipt>";
	html += "</head>n";
	html += "<body>n";
	html += "<center>n";
	html += "<form name=\"form1\" action=\"http://www.x10.com/cgi-bin/affiliates/affrefer.cgi\" method=\"get\">\n";
html += "<input type=\"hidden\" name=\"affiliate\" value=\""+this.PID+"\">\n";
	html += "<input type=\"hidden\" name=\"site\" value=\""+url+"\">\n";
	html += "<table cellpadding=\"5\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n";
	html += "<tr><td>";
	html += "<B>Your Name :</B>";
	html += "</td><td>";
	html += "<input type=\"text\" name=\"sender_name\" value=\"\">\n";
	html += "</td></tr><tr><td>";
	html += "<B>Your Email :</B>";
	html += "</td><td>";
	html += "<input type=\"text\" name=\"sender_email\" value=\"\">\n";
	html += "</td></tr><tr><td>";
	html += "<B>Messages ( 80 characters) :</B>";
	html += "</td><td>";
	html += "<input type=\"text\" name=\"sender_messages\" value=\"\" maxlength=\"80\">\n<BR>";
	html += "</td></tr><tr><td>";
	html += "<B>Friend's Email(s) :</B>";
	html += "</td><td>";
	html += "<input type=\"text\" name=\"friend\"><BR>";
	html += "</td></tr><tr><td colspan=\"2\" align=\"center\">";
	html += "<input type=\"button\" value=\"Add Email\" onclick=\"addItemToList();\">";
	html += "<input type=\"button\" value=\"Remove Email\" onclick=\"removeItemFromList();\"><BR>"; 
	html += "</td></tr><tr><td colspan=\"2\" align=\"center\">";
	html += "<select name=\"list\" MULTIPLE size=\"5\">";
	html += "<option value=\"1\">Email Address(es)</option>";
	html += "</select>";
	html += "</td></tr>";
	html += "<tr><td colspan=\"2\" align=\"right\">\n";
	html += "<input type=\"submit\" value=\"send\">\n";
	html += "</td></tr>n";
	html += "</table>n";
	html += "</form>n";
	html += "</center>n";
	html += "</body>n";
	html += "</html>n";
	
	win = window.open("","NewWindow","width=400,height=450,");
	win.document.open();
	win.document.write( html );
	win.document.close();

}
var CJ = new x10Deals();

window.onunload=getExitPop;


