function MM_openBrWindow(C,A,B){window.open(C,A,B)}
function expresship(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/expresship.html","","scrollbars=no,status=no,width=225,height=175")}
function smscharges(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/smscharges.html","","scrollbars=no,status=no,width=380,height=160")}
function redeemgc(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/redeemgc.html","","scrollbars=yes,status=no,width=650,height=800")}
function redeemgchome(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/redeemgc.html?utm_source=homepage&utm_medium=customer%2Bzone&utm_term=how%2Bto%20use%20a%20gc&utm_campaign=homepage%2Bcustomer%20zone%20how%20to%20use%20a%20gc%2030%20July%2009","","scrollbars=yes,status=no,width=650,height=800")}
function ourpromises(){window.open("http://www.homeshop18.com/hs18shop/faces/tiles/templates/media/misc/homeshop18/ourpromises.html","","scrollbars=yes,status=no,width=725,height=600")}
function diwalicontest(){window.open("http://www.homeshop18.com/hs18shop/faces/tiles/templates/media/misc/homeshop18/diwalicontest.html","","scrollbars=yes,status=no,width=510,height=325")}
function diwalifree(){window.open("http://www.homeshop18.com/hs18shop/faces/tiles/templates/media/misc/homeshop18/diwalifree.html","","scrollbars=yes,status=no,width=510,height=375")}
function hsbctc(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/hsbctc.html","","scrollbars=yes,status=no,width=650,height=560")}
function visasecure(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/visasecure.html","","scrollbars=yes,status=no,width=650,height=350")}
function overdrivetnc(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/hs18tv/overdrivetnc.html","","scrollbars=no,status=no,width=400,height=350")}
function annivceleb(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/hs18tv/AnniversarCelebration_TnC.html","","scrollbars=yes,status=no,width=630,height=500")}

function zephyrprofile(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/zephyrCompanyProfile.html","","scrollbars=yes,status=no,width=650,height=350")}
function mastersecure(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/mastercardsecure.html","","scrollbars=yes,status=no,width=650,height=350")}
function getposOffset(A,D){var C=(D=="left")?A.offsetLeft:A.offsetTop;var B=A.offsetParent;while(B!=null){C=(D=="left")?C+B.offsetLeft:C+B.offsetTop;B=B.offsetParent}return C}
function overlay(E,D,A){if(document.getElementById){var C=document.getElementById(D);C.style.display=(C.style.display!="block")?"block":"none";var B=getposOffset(E,"left")+((typeof A!="undefined"&&A.indexOf("right")!=-1)?-(C.offsetWidth-E.offsetWidth):0);var F=getposOffset(E,"bottom")+((typeof A!="undefined"&&A.indexOf("bottom")!=-1)?E.offsetHeight:0);C.style.left=B+"px";C.style.top=F+"px";return false}else{return true}}
function overlayclose(A){document.getElementById(A).style.display="none"}
function cdtime(A,B){if(!document.getElementById||!document.getElementById(A)){return }this.container=document.getElementById(A);this.currentTime=new Date();this.targetdate=new Date(B);this.timesup=false;this.updateTime()}cdtime.prototype.updateTime=function(){var A=this;this.currentTime.setSeconds(this.currentTime.getSeconds()+1);setTimeout(function(){A.updateTime()},1000)};cdtime.prototype.displaycountdown=function(A,B){this.baseunit=A;this.formatresults=B;this.showresults()};cdtime.prototype.showresults=function(){var A=this;var F=(this.targetdate-this.currentTime)/1000;if(F<0){this.timesup=true;this.container.innerHTML=this.formatresults();return }var C=60;var H=60*60;var I=60*60*24;var D=Math.floor(F/I);var B=Math.floor((F-D*I)/H);var G=Math.floor((F-D*I-B*H)/C);var E=Math.floor((F-D*I-B*H-G*C));if(this.baseunit=="hours"){B=D*24+B;D="n/a"}else{if(this.baseunit=="minutes"){G=D*24*60+B*60+G;D=B="n/a"}else{if(this.baseunit=="seconds"){var E=F;D=B=G="n/a"}}}this.container.innerHTML=this.formatresults(D,B,G,E);setTimeout(function(){A.showresults()},1000)};
function formatresults(){if(this.timesup==false){var A=""}else{var A=""}return A}
function formatresults2(){if(this.timesup==false){var A="<span class='lcdstyle'>"+arguments[0]+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+arguments[1]+"&nbsp;&nbsp;&nbsp;&nbsp;"+arguments[2]+"&nbsp;&nbsp;&nbsp;"+arguments[3]+"</span>"}else{var A="<span class='happynewyear'>Happy New Year</span>"}return A}
function geths18tv(){window.open("http://www.homeshop18.com/shop/faces/jsp/getHS18TV.jsp","","scrollbars=yes,status=no,width=650,height=520")}
function thwate(){window.open("https://sealinfo.thawte.com/thawtesplash?form_file=fdf/thawtesplash.fdf&dn=WWW.HOMESHOP18.COM&lang=en","","scrollbars=yes,status=no,width=525,height=640")}
function diwalitc(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/diwalidhamaaltnc.html","","scrollbars=yes,status=no,width=625,height=350")}
function ehw_tnc(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/hs18tv/ehwtnc.html","","scrollbars=yes,status=no,width=625,height=350")}
function kidstc(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/kidsTnC.html","","scrollbars=yes,status=no,width=650,height=350")}
function valuefaq(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/valueofferpack-faq.html","","scrollbars=yes,status=no,width=650,height=500")}
function valuetnc(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/valueofferpack-tnc.html","","scrollbars=yes,status=no,width=650,height=500")}
function lovesms(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/love18SMS-TnC.html","","scrollbars=yes,status=no,width=650,height=500")}
function mitashitnc(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/hs18tv/t&conMitashi.html","","scrollbars=yes,status=no,width=650,height=500")}
function axisbanktnc(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/hs18tv/termsconditionsAxisBank.html","","scrollbars=yes,status=no,width=650,height=500")}
function GCtnc(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/hs18tv/gcRedemptionTCs.html","","scrollbars=yes,status=no,width=650,height=500")}

function ddpendantwinner(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/dd-pendantwinner.html","","scrollbars=yes,status=no,width=850,height=600")}
function dddvdmp3winner(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/dd-dvd-mp3-winner.html","","scrollbars=yes,status=no,width=850,height=600")}
function dddvdifbapplianceswinner(){window.open("http://www.homeshop18.com/homeshop18/images/indexpage/misc/dd-dvd-ifbappliances-winner.html","","scrollbars=yes,status=no,width=850,height=600")}

function getCalendarDate()
{
   var months = new Array(13);
   months[0]  = "01";
   months[1]  = "02";
   months[2]  = "03";
   months[3]  = "04";
   months[4]  = "05";
   months[5]  = "06";
   months[6]  = "07";
   months[7]  = "08";
   months[8]  = "09";
   months[9]  = "10";
   months[10] = "11";
   months[11] = "12";
   var now         = new Date();
   var monthnumber = now.getMonth();
   var monthname   = months[monthnumber];
   var monthday    = now.getDate();
   var year        = now.getYear();
   if(year < 2000) { year = year + 1900; }
   var dateString = year +
                    '-' +
                    monthname +
                    '-' +
                    monthday;
   return dateString;
} 
// function getCalendarDate()

function getClockTime()
{
   var now    = new Date();
   var hour   = now.getHours();
   var minute = now.getMinutes();
   var second = now.getSeconds();
   var ap = "AM";
   if (hour   > 11) { ap = "PM";             }
   if (hour   > 12) { hour = hour - 12;      }
   if (hour   == 0) { hour = 12;             }
   if (hour   < 10) { hour   = "0" + hour;   }
   if (minute < 10) { minute = "0" + minute; }
   if (second < 10) { second = "0" + second; }
   var timeString = hour +
                    ':' +
                    minute +
                    ':' +
                    second +
                    " " +
                    ap;
   return timeString;
}
