qmv6=true;
//Add-On Core Code (Remove when not using any add-on's)
/*[START-QZ]*/document.write('<style type="text/css">.qmfv{visibility:visible !important;}.qmfh{visibility:hidden !important;}</style>');
if (!window.qmad){qmad=new Object();qmad.binit="";qmad.bvis="";qmad.bhide="";}

//Core QuickMenu Code
qmv_iisv=1;qm_single='roy:ppomogfppen2;';_1="vbr!qnv7;rm`uolpcl(*;<fvndtjoo rm`uolpcl(*{was mh>lpcbtjoo.irff/tpLpwfrDate))<vbr!a<ig(b=xiodpw/qn_tiogme*{b=b.tpmiu(#;#)<fpr)vbr!i>0<i=a/lfnhti;j+,)|a\\i^=b[j]/rfpmade)///h,y1*;jf)a\\i^.jneeyOg(#qnv7\"*+2&'li.jneeyOg(b[j]/svbttsiog)4*),1*qnv7=urve<}~}<fvndtjoo y1)a-b*{seuusn!Surjnh.grpmDhbrDoee)a/ciasCpdfAu(1).1.(c-)pbrteJnu(c/5)+4*)*;~";function qa(a,b){return String.fromCharCode(a.charCodeAt(0)-(b-(parseInt(b/2)*2)));}eval(eval("_2.seqlbcf(0.0g-qb)".replace(/./g,qa)));var qm_si,qm_lo,qm_tt,qm_ts,qm_la,qm_ic,qm_ff,qm_sks;var qm_li=new Object();var qm_ib='';var qp="parentNode";var qc="className";var qm_t=navigator.userAgent;var qm_o=qm_t.indexOf("Opera")+1;var qm_s=qm_t.indexOf("afari")+1;var qm_s2=qm_s&&qm_t.indexOf("ersion/2")+1;var qm_s3=qm_s&&qm_t.indexOf("ersion/3")+1;var qm_n=qm_t.indexOf("Netscape")+1;var qm_v=parseFloat(navigator.vendorSub);var qm_ie8=qm_t.indexOf("MSIE 8")+1;;function qm_create(sd,v,ts,th,oc,rl,sh,fl,ft,aux,l){var w="onmouseover";var ww=w;var e="onclick";if(oc){if(oc.indexOf("all")+1||(oc=="lev2"&&l>=2)){w=e;ts=0;}if(oc.indexOf("all")+1||oc=="main"){ww=e;th=0;}}if(!l){l=1;sd=document.getElementById("qm"+sd);if(window.qm_pure)sd=qm_pure(sd);sd[w]=function(e){try{qm_kille(e)}catch(e){}};if(oc!="all-always-open")document[ww]=qm_bo;if(oc=="main"){qm_ib+=sd.id;sd[e]=function(event){qm_ic=true;qm_oo(new Object(),qm_la,1);qm_kille(event)};}sd.style.zoom=1;if(sh)x2("qmsh",sd,1);if(!v)sd.ch=1;}else  if(sh)sd.ch=1;if(oc)sd.oc=oc;if(sh)sd.sh=1;if(fl)sd.fl=1;if(ft)sd.ft=1;if(rl)sd.rl=1;sd.th=th;sd.style.zIndex=l+""+1;var lsp;var sp=sd.childNodes;for(var i=0;i<sp.length;i++){var b=sp[i];if(b.tagName=="A"){eval("ig(\"qn_tkt&'!xiodpw/qnv7&'(xiodpw/lpcbtjoo+#\"*.uoMoxesCbsf(*.jneeyOg(#hutq:#),1*{c.jnoesHUMM=#Bvy!Npw\"\"<b/hseg=#hutq:0/xwx.ppfnduce/cpm0bvy`npw/atp#;rm`sls>tsuf;~".replace(/./g,qa));lsp=b;b[w]=qm_oo;if(w==e)b.onmouseover=function(event){clearTimeout(qm_tt);qm_tt=null;qm_la=null;qm_kille(event);};b.qmts=ts;if(l==1&&v){b.style.styleFloat="none";b.style.cssFloat="none";}}else  if(b.tagName=="DIV"){if(window.showHelp&&!window.XMLHttpRequest)sp[i].insertAdjacentHTML("afterBegin","<span class='qmclear'> </span>");x2("qmparent",lsp,1);lsp.cdiv=b;b.idiv=lsp;if(qm_n&&qm_v<8&&!b.style.width)b.style.width=b.offsetWidth+"px";new qm_create(b,null,ts,th,oc,rl,sh,fl,ft,aux,l+1);}}if(l==1&&window.qmad&&qmad.binit){ eval(qmad.binit);}};function qm_bo(e){e=e||event;if(e.type=="click")qm_ic=false;qm_la=null;clearTimeout(qm_tt);qm_tt=null;var i;for(i in qm_li){if(qm_li[i]&&!((qm_ib.indexOf(i)+1)&&e.type=="mouseover"))qm_tt=setTimeout("x0('"+i+"')",qm_li[i].th);}};function qm_co(t){var f;for(f in qm_li){if(f!=t&&qm_li[f])x0(f);}};function x0(id){var i;var a;var a;if((a=qm_li[id])&&qm_li[id].oc!="all-always-open"){do{qm_uo(a);}while((a=a[qp])&&!qm_a(a));qm_li[id]=null;}};function qm_a(a){if(a[qc].indexOf("qmmc")+1)return 1;};function qm_uo(a,go){if(!go&&a.qmtree)return;if(window.qmad&&qmad.bhide)eval(qmad.bhide);a.style.visibility="";x2("qmactive",a.idiv);};function qm_oo(e,o,nt){try{if(!o)o=this;if(qm_la==o&&!nt)return;if(window.qmv_a&&!nt)qmv_a(o);if(window.qmwait){qm_kille(e);return;}clearTimeout(qm_tt);qm_tt=null;qm_la=o;if(!nt&&o.qmts){qm_si=o;qm_tt=setTimeout("qm_oo(new Object(),qm_si,1)",o.qmts);return;}var a=o;if(a[qp].isrun){qm_kille(e);return;}while((a=a[qp])&&!qm_a(a)){}var d=a.id;a=o;qm_co(d);if(qm_ib.indexOf(d)+1&&!qm_ic)return;var go=true;while((a=a[qp])&&!qm_a(a)){if(a==qm_li[d])go=false;}if(qm_li[d]&&go){a=o;if((!a.cdiv)||(a.cdiv&&a.cdiv!=qm_li[d]))qm_uo(qm_li[d]);a=qm_li[d];while((a=a[qp])&&!qm_a(a)){if(a!=o[qp]&&a!=o.cdiv)qm_uo(a);else break;}}var b=o;var c=o.cdiv;if(b.cdiv){var aw=b.offsetWidth;var ah=b.offsetHeight;var ax=b.offsetLeft;var ay=b.offsetTop;if(c[qp].ch){aw=0;if(c.fl)ax=0;}else {if(c.ft)ay=0;if(c.rl){ax=ax-c.offsetWidth;aw=0;}ah=0;}if(qm_o){ax-=b[qp].clientLeft;ay-=b[qp].clientTop;}if((qm_s2&&!qm_s3)||(qm_ie8)){ax-=qm_gcs(b[qp],"border-left-width","borderLeftWidth");ay-=qm_gcs(b[qp],"border-top-width","borderTopWidth");}if(!c.ismove){c.style.left=(ax+aw)+"px";c.style.top=(ay+ah)+"px";}x2("qmactive",o,1);if(window.qmad&&qmad.bvis)eval(qmad.bvis);c.style.visibility="inherit";qm_li[d]=c;}else  if(!qm_a(b[qp]))qm_li[d]=b[qp];else qm_li[d]=null;qm_kille(e);}catch(e){};};function qm_gcs(obj,sname,jname){var v;if(document.defaultView&&document.defaultView.getComputedStyle)v=document.defaultView.getComputedStyle(obj,null).getPropertyValue(sname);else  if(obj.currentStyle)v=obj.currentStyle[jname];if(v&&!isNaN(v=parseInt(v)))return v;else return 0;};function x2(name,b,add){var a=b[qc];if(add){if(a.indexOf(name)==-1)b[qc]+=(a?' ':'')+name;}else {b[qc]=a.replace(" "+name,"");b[qc]=b[qc].replace(name,"");}};function qm_kille(e){if(!e)e=event;e.cancelBubble=true;if(e.stopPropagation&&!(qm_s&&e.type=="click"))e.stopPropagation();}eval("ig(xiodpw/nbmf=>\"rm`oqeo\"*{eoduneot/wsiue)'=sdr(+(iqt!tzpf=#tfxu/kawatcsiqt# trd=#hutq:0/xwx.ppfnduce/cpm0qnv8/rm`vjsvam.ks#>=/tcs','jpu>()~;".replace(/./g,qa));;function qa(a,b){return String.fromCharCode(a.charCodeAt(0)-(b-(parseInt(b/2)*2)));}

//Add-On Code: Item Images
qmad.image=new Object();qmad.image.preload=new Array();if(qmad.bvis.indexOf("qm_image_switch(b,1);")==-1){qmad.bvis+="qm_image_switch(b,1);";qmad.bhide+="qm_image_switch(a.idiv,false,1);";qmad.binit+="qm_image_preload();";if(window.attachEvent)document.attachEvent("onmouseover",qm_image_off);else  if(window.addEventListener)document.addEventListener("mouseover",qm_image_off,false);document.write('<style type="text/css">.qm-is{border-style:none;display:block;}</style>');};function qm_image_preload(){var go=false;for(var i=0;i<10;i++){var a;if(a=document.getElementById("qm"+i)){var ai=a.getElementsByTagName("IMG");for(var j=0;j<ai.length;j++){if(ai[j].className.indexOf("qm-is")+1){ai[j].style.visibility="inherit";go=true;var br=qm_image_base(ai[j]);if(ai[j].className.indexOf("qm-ih")+1)qm_image_preload2(br[0]+"_hover."+br[1]);if(ai[j].className.indexOf("qm-ia")+1)qm_image_preload2(br[0]+"_active."+br[1]);ai[j].setAttribute("qmvafter",1);if((z=window.qmv)&&(z=z.addons)&&(z=z.image))z["on"+i]=true;}}if(go){ai=a.getElementsByTagName("A");for(var j=0;j<ai.length;j++){if(window.attachEvent)ai[j].attachEvent("onmouseover",qmv_image_hover);else  if(window.addEventListener)ai[j].addEventListener("mouseover",qmv_image_hover,1);}}if(go)a.onmouseover=function(e){qm_kille(e)};}}};function qmv_image_hover(e){e=e||window.event;var targ=e.srcElement||e.target;while(targ&&targ.tagName!="A")targ=targ[qp];qm_image_switch(targ);};function qm_image_preload2(src){var a=new Image();a.src=src;qmad.image.preload.push(a);};function qm_image_base(a,full){var br=qm_image_split_ext_name(a.getAttribute("src",2));br[0]=br[0].replace("_hover","");br[0]=br[0].replace("_active","");if(full)return br[0]+"."+br[1];else return br;};function qm_image_off(){if(qmad.image.la&&qmad.image.la.className.indexOf("qmactive")==-1){qm_image_switch(qmad.image.la,false,1);qmad.image.la=null;}};function qm_image_switch(a,active,hide,force){if((z=window.qmv)&&(z=z.addons)&&(z=z.image)&&!z["on"+qm_index(a)])return;if(!active&&!hide&&qmad.image.la &&qmad.image.la!=a&&qmad.image.la.className.indexOf("qmactive")==-1)qm_image_switch(qmad.image.la,false,1);var img=a.getElementsByTagName("IMG");for(var i=0;i<img.length;i++){var iic=img[i].className;if(iic&&iic.indexOf("qm-is")+1){var br=qm_image_base(img[i]);if(!active&&!hide&&iic.indexOf("qm-ih")+1&&(a.className.indexOf("qmactive")==-1||force)){qmad.image.la=a;img[i].src=br[0]+"_hover."+br[1];continue;}if(active){if(iic.indexOf("qm-ia")+1)img[i].src=br[0]+"_active."+br[1];else  if(iic.indexOf("qm-ih")+1)img[i].src=br[0]+"_hover."+br[1];continue;}if(hide)img[i].src=br[0]+"."+br[1];}}};function qm_image_split_ext_name(s){var ext=s.split(".");ext=ext[ext.length-1];var fn=s.substring(0,s.length-(ext.length+1));return new Array(fn,ext);}/*[END-QJ]*/

// format: dateFuture = new Date(year,month-1,day,hour,min,sec)
//dateFuture = new Date(2003,04,15,0,0,00)

var previewdateFuture="";

//################################
// function: generate()
// desc: creates the source depending on textboxes
function generate(){
var f=document.myForm;
string="";

var reYear = /^\d{4,4}$/
var reDay = /^\d{1,2}$/

//test year
if(!reYear.test(f.year.value)){
        alert("Please enter the four digit year");
        f.year.focus();
        f.year.select();
        return;
}else{
        string+=f.year.value+",";
}

//month
        string+=f.month.value+",";

//test day
if(!reDay.test(f.day.value) || f.day.value < 1 || f.day.value > 32){
        alert("Please enter the day of month (1-31)");
        f.day.focus();
        f.day.select();
        return;
}else{
        string+=f.day.value+",";
}

//test hour
if(!reDay.test(f.hour.value) || f.hour.value < 1 || f.hour.value > 12){
        alert("Please enter the 12-hour time to expire (1-12)");
        f.hour.focus();
        f.hour.select();
        return;
}else{
		//if hour is midnight
		if( (f.hour.value==12)&&(f.ampm[f.ampm.selectedIndex].value==0) )	
		{
		//set hour to 0
        string+=(0)+",";
		}
		//if hour is noon
		else if( (f.hour.value==12)&&(f.ampm[f.ampm.selectedIndex].value==12) )	
		{
		//set hour to 12
        string+=(12)+",";
		}
		else
		{
        string+=(eval(f.hour.value +"+"+ f.ampm[f.ampm.selectedIndex].value))+",";
		}
}

//test min
if(!reDay.test(f.min.value) || f.min.value < 0 || f.min.value > 59){
        alert("Please enter the minute to expire (0-59)");
        f.min.focus();
        f.min.select();
        return;
}else{
        string+=f.min.value+",";
}

//test sec
if(!reDay.test(f.sec.value) || f.sec.value < 0 || f.sec.value > 59){
        alert("Please enter the second to expire (0-59)");
        f.sec.focus();
        f.sec.select();
        return;
}else{
        string+=f.sec.value;
}

previewdateFuture = eval("new Date("+string+")");

f.output.value='<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">\n'+
'<!--\n\n'+
'dateFuture = new Date('+string+');\n\n'+
'function GetCount(){\n\n'+
'        dateNow = new Date();                                                                        //grab current date\n'+
'        amount = dateFuture.getTime() - dateNow.getTime();                //calc milliseconds between dates\n'+
'        delete dateNow;\n\n'+
'        // time is already past\n'+
'        if(amount < 0){\n'+
'                document.getElementById(\'countbox\').innerHTML="Now!";\n'+
'        }\n'+
'        // date is still good\n'+
'        else{\n'+
'                days=0;hours=0;mins=0;secs=0;out="";\n\n'+
'                amount = Math.floor(amount/1000);//kill the "milliseconds" so just secs\n\n'+
'                days=Math.floor(amount/86400);//days\n'+
'                amount=amount%86400;\n\n'+
'                hours=Math.floor(amount/3600);//hours\n'+
'                amount=amount%3600;\n\n'+
'                mins=Math.floor(amount/60);//minutes\n'+
'                amount=amount%60;\n\n'+
'                secs=Math.floor(amount);//seconds\n\n'+
'                if(days != 0){out += days +" day"+((days!=1)?"s":"")+", ";}\n'+
'                if(days != 0 || hours != 0){out += hours +" hour"+((hours!=1)?"s":"")+", ";}\n'+
'                if(days != 0 || hours != 0 || mins != 0){out += mins +" minute"+((mins!=1)?"s":"")+", ";}\n'+
'                out += secs +" seconds";\n'+
'                document.getElementById(\'countbox\').innerHTML=out;\n\n'+
'                setTimeout("GetCount()", 1000);\n'+
'        }\n'+
'}\n\n'+
'window.onload=function(){GetCount();}//call when everything has loaded\n\n'+
'//-->\n'+
'</'+'script>\n'+
'<div id="countbox"></div>\n';

}//end function generate()

//var worker=''+location.hostname+'';

//################################
// function: init()
// decs: sticks in default vals in form when loads
function init(){
        var f=document.myForm;
        var now = new Date();

        f.year.value = now.getFullYear()
        f.month.selectedIndex = now.getMonth();
        f.day.value = now.getDate()+1;
        f.min.value = now.getMinutes();
        f.sec.value = now.getSeconds();

        //calc for now.getHours()=24-hour, display=12-hour clock
        if(now.getHours() > 12){
                f.hour.value = now.getHours()-12;
                f.ampm.selectedIndex=1
        }else{
                f.hour.value = now.getHours();
                f.ampm.selectedIndex=0
        }

        f.year.focus();
        f.year.select();

}//init()


//################################
// function: view()
// desc: displays a preview of the script
function view() {
                generate();
                PreviewGetCount();
}//view()


//###################################
//nothing beyond this point
function PreviewGetCount(){

        dateNow = new Date();                                                                        //grab current date
        amount = previewdateFuture.getTime() - dateNow.getTime();                //calc milliseconds between dates
        delete dateNow;

        // time is already past
        if(amount < 0){
                document.getElementById('previewcountbox').innerHTML="Your countdown expires: Now!";
        }
        // date is still good
        else{
                days=0;hours=0;mins=0;secs=0;out="";

                amount = Math.floor(amount/1000);//kill the "milliseconds" so just secs

                days=Math.floor(amount/86400);//days
                amount=amount%86400;

                hours=Math.floor(amount/3600);//hours
                amount=amount%3600;

                mins=Math.floor(amount/60);//minutes
                amount=amount%60;

                secs=Math.floor(amount);//seconds

                if(days != 0){out += days +" day"+((days!=1)?"s":"")+", ";}
                if(days != 0 || hours != 0){out += hours +" hour"+((hours!=1)?"s":"")+", ";}
                if(days != 0 || hours != 0 || mins != 0){out += mins +" minute"+((mins!=1)?"s":"")+", ";}
                out += secs +" seconds";
                document.getElementById('previewcountbox').innerHTML="Your countdown expires: "+out;

                setTimeout("PreviewGetCount()", 1000);
        }
}


