
function x10HotDeals(){

	this.AffiliateID=null;
	this.EXITPOP=false;
	this.EXITPOPSKU=null;
	this.decache = new Date();
	this.CAMPAIGN="bGNqYnV5bm93LmRhd";
	this.TRACKPixel="Z2NqanN0cmsuZGF0=";
	
	//STANDARD FUNCTION
	this.getTextLinkHD=getTextLinkHD;
	this.getOrderButtonHD=getOrderButtonHD;
	this.submitOrder=submitOrder;
	this.getExitPop=getExitPop;
	this.EnableExitPop=EnableExitPop;
	this.hotDeals=hotDeals;
}

function hotDeals() {
	
document.write('<style>');
document.write('.wtHead, .wtNote, .wtNote A, .wtNote A:hover {font-family: Tahoma, Arial, Geneva, Sans-Serif; font-weight: bold}');
document.write('.wtUrgent, .wtUrgent2, .wtSubHead, .wtSubHead A, .wtSubHead A:hover, .wtRSubHead, .wtRSubHead2, .wtSubSubHead, .wtPriceHead, .wtBonusHead, .wtText, .wtText A, .wtText A:hover, .wtRText, .wtRText2, .wtGText, .wtFill, .wtFill2, .wtFill2 A, .wtFill2 A:hover, td, ul, ol {font-family:Arial, Geneva, sans-serif}');
document.write('.wtUrgent, .wtUrgent2, .wtHead, .wtNote, .wtSubHead, .wtRSubHead, .wtRSubHead2, .wtSubSubHead, .wtPriceHead, .wtBonusHead, .wtText A, .wtText A:hover, .wtRText, .wtRText2, .wtGText, .wtFill2, .wtFill2 A, .wtFill2 A:hover {font-weight:bold}');
document.write('.wtFill2, .wtFill2 A, .wtFill2 A:hover, .wtFill2Ssi, .wtFill2Ssi A, .wtFill2Ssi A:hover {text-align:center}');
document.write('.wtHead {font-size:22px}');
document.write('.wtSubHead, .wtSubHead A, .wtSubHead A:hover, .wtRSubHead, .wtRSubHead2, .wtPriceHead {font-size:18px}');
document.write('.wtUrgent2, .wtSubSubHead, .wtBonusHead {font-size:14px}');
document.write('.wtText, .wtText A, .wtText A:hover, .wtRText, .wtRText2, .wtGText, .wtFill, .wtFill2, .wtFill2 A, .wtFill2 A:hover, td, ul, ol {font-size:12px}');
document.write('.wtNote, .wtNote A, .wtNote A:hover {font-size:10px}');
document.write('ul, ol {line-height:16px}');
document.write('.wtUrgent, .wtUrgent2 {background-color:#FF0000;color:#FFFF00}');
document.write('.wtRSubHead, .wtRSubHead2, .wtSubSubHead, .wtBonusHead, .wtRText, .wtRText2 {color:#FF0000}');
document.write('.wtSubHead A, .wtText A {color:#0000FF}');
document.write('.wtRSubHead2, .wtRText2 {background-color:#FFFF00}');
document.write('.wtPriceHead {background-color:#FF0000;color:#FFFFFF}');
document.write('.wtText A:hover, .wtNote A:hover, .wtSubHead A:hover {color:#FFFFFF;background-color:#0000FF}');
document.write('.wtGText {color:#009900}');
document.write('.wtPrice {background-color:#FFFFFF}');
document.write('.wtPrice2 {background-color:#F9F9F9}');
document.write('.wtBonusHead, .wtBonus {background-color:#FFFFCC}');
document.write('.wtBonus2 {background-color:#FFFFE3}');
document.write('.wtGift {background-color:#DDFFDD}');
document.write('.wtFill {background-color:#112233}');
document.write('.wtFill2, .wtFill2 A, .wtFill2 A:hover {color:#FFFFFF;background-color:#445566}');
document.write('.wtFillSsi {background-color:#009988}');
document.write('.wtFill2Ssi, .wtFill2Ssi A, .wtFill2Ssi A:hover {color:#FFFFFF;background-color:#776655}');
document.write('.wtbdr {border-width:1px;border-style:solid;border-color:#445566}');
document.write('.wtbdr2 {border-width:1px;border-style:solid;border-color:#445566;border-bottom-width: 0px}');
document.write('.wtbdrSsi {border-width:1px;border-style:solid;border-color:#776655}');
document.write('.wtbdr2Ssi {border-width:1px;border-style:solid;border-color:#776655;border-bottom-width: 0px}');
document.write('.wtDivider {background-image: url(http://graphics.x10.com/images15/bg_divider_1107.gif)}');
document.write('.wtSplit {background-color: #445566}');
document.write('.clsSidebar {font-size: 11px; font-weight: bold; color: #000000; font-family: Arial, Geneva, Sans-Serif; line-height: 16px;}');
document.write('.clsInclude, .clsAltSidebar {font-size: 11px; color: #FF0000; font-family: Arial, Geneva, Sans-Serif;}');
document.write('a.menu:link, a.menu:visited {font-size: 10px;font-family: arial,sans-serif;color: #333333;text-decoration: none;line-height: 18px}');
document.write('a.menu:active, a.menu:hover {font-size: 10px;font-family: arial,sans-serif;color: #333333;text-decoration: underline;line-height: 18px}');
document.write('</style>');

}
function getExitPop() {

	if(X10.EXITPOP) {
		
		var name = "http://affiliates.x10.com/affiliates/x10_"+X10.EXITPOPSKU.toLowerCase()+".htm?PID="+X10.AffiliateID;

		window.open(name,"CJEXITPOP","width=460,height=600,titlebar=1,toolbar=1,location=1,menubar=1,scrollbars=1,resizable=1,status=1");

	}
	
}
function EnableExitPop(sku) {
	
	if(sku) {
		
		this.EXITPOP=true;
		this.EXITPOPSKU=sku;
		
	}
}
function getOrderButtonHD(img,itemnum,sku,what){
	var graphic = "";

	if(img != null) {
		graphic = img
	}
	else {
		graphic = this.ButtonImg;
	}
	
	if(itemnum) {
		
		if( this.AffiliateID != null ) {
			
			if(what == 0) {
				
				document.write('<a onclick="X10.EXITPOP=false;" href="http://affiliates.x10.com/?property=affiliates&aposition=buynow&lineid=xtentest1&affid='+this.AffiliateID+'&type=href&item='+itemnum+'"><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('<table border=0 cellpadding=0 cellspacing=0><tr><td>');
				
				//Affiliate Link
				document.write('<a onclick="X10.EXITPOP=false;" href="http://affiliates.x10.com/?property=affiliates&aposition=buynow&lineid=xtentest1&affid='+this.AffiliateID+'&type=href&item='+itemnum+'">');

				//Button graphic
				document.write('<img src="'+graphic+'" border="0"></a>');

				//Tracking Pixel
				//document.write('<img src="http://ads.x10.com/?'+this.TRACKPixel+'='+this.decache.getTime()+'|'+this.AffiliateID+'" width=1 height=1>');

				document.write('</td></tr><tr><td align=center>');
				document.write('<font color="#">');
				document.write('<a href="#" onclick="X10.EXITPOP=false;window.open(\'http://www.x10.com/cgi-bin/cj_viewparts.cgi?sku='+sku+'&AID='+this.AffiliateID+'&CAMP='+this.CAMPAIGN+'&ITEMNUM='+itemnum+'\',\'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 {
			
			document.write('<a onclick="X10.EXITPOP=false;" href="javascript:X10.submitOrder('+itemnum+',0);"><img src="'+graphic+'" border=0></a><img src="http://ads.x10.com/?'+this.TRACKPixel+'='+this.decache.getTime()+'|'+this.AffiliateID+'" width=1 height=1>');
			
		}
		
	} else {
		
		document.write("Not Availiable");
		
	}
}
function getTextLinkHD(text,itemnum,sku){

	if(itemnum) {	
		
		if( this.AffiliateID != null) {

			//Affiliate Link
			document.write('<a onclick="X10.EXITPOP=false;" href="http://affiliates.x10.com/?property=affiliates&aposition=buynow&lineid=xtentest1&affid='+this.AffiliateID+'&type=href&item='+itemnum+'">');

			//Button graphic
			document.write(text+'</a>');

			//Tracking Pixel
			//document.write('<img src="http://ads.x10.com/?'+this.TRACKPixel+'='+this.decache.getTime()+'|'+this.AffiliateID+'" width=1 height=1>');

		} else {
			
			document.write('<a onclick="X10.EXITPOP=false;" href="javascript:X10.submitOrder('+itemnum+',0);">'+text+'</a>');
			
		}
		
	} else {
		document.write("Not Availiable");
	}
}
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";
		
	}
 	
}
var X10 = new x10HotDeals();
window.onunload=getExitPop;

