function writeDate(){
  var this_month = new Array();
      this_month[0] = "January";
      this_month[1] = "February";
      this_month[2] = "March";
      this_month[3] = "April";
      this_month[4] = "May";
      this_month[5] = "June";
      this_month[6] = "July";
      this_month[7] = "August";
      this_month[8] = "September";
      this_month[9] = "October";
      this_month[10] = "November";
      this_month[11] = "December";
  var today = new Date();
  var day = today.getDate();
  var month = today.getMonth();
  var year = today.getYear();
    year <= 100 ? year += 1900 : 0;
  var time = today.getHours();
    if (time >= 12){
      if (time > 12){time -= 12;}
      today.getMinutes() < 10 ? time = time+":0"+today.getMinutes()+" PM" : time = time+":"+today.getMinutes()+" PM";
    }else{
      if (time == 0){time = 12;}
      today.getMinutes() < 10 ? time = time+":0"+today.getMinutes()+" AM" : time = time+":"+today.getMinutes()+" AM";
    }
  return("&nbsp;"+this_month[month]+" "+day+", "+year+" "+time);
}

function MM_preloadImages() { 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { 
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { 1
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { 
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function tellfriend()
{
window.open('http://www.rvhotlinecanada.com/tellfriend.htm','tellfreind','width=400,height=250,left=20,top=20,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
}
function product()
{
window.open('http://www.rvhotlinecanada.com/1051015F.htm','always','width=617,height=510,left=20,top=20,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=no');
}
function featproduct()
{
window.open('http://www.rvhotlinecanada.com/1060002F.htm','always','width=617,height=510,left=20,top=20,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=no');
}
function featprod()
{
window.open('http://www.rvhotlinecanada.com/106003AS.htm','always','width=617,height=510,left=20,top=20,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=no');
}
function prod()
{
window.open('http://www.rvhotlinecanada.com/sani.htm','moon','width=617,height=510,left=20,top=20,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=no');
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function etwin()
{
window.open('entertowin.htm','entow','width=400,height=480,left=50,top=10,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
}
function formHandler(){
  var URL = document.rvdescriptions.des.options[document.rvdescriptions.des.selectedIndex].value;
  top.location.href = URL;
}

function chkclass(){
if ( document.form1.stype.options[document.form1.stype.selectedIndex].text=="Motorhome")
{ document.form1.sclass.disabled = false; }
else { document.form1.sclass.disabled = true;
document.form1.stype.options[document.form1.stype.selectedIndex].text=="";}
//document.form1.stype.options[document.form1.stype.selectedIndex].text=="Motorhome" }
}

function tellfriend()
{
window.open('http://www.rvhotlinecanada.com/tellfriend.htm','tellfreind','width=400,height=250,left=20,top=20,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
}

function remos()
{
window.open('/remoska','remos','width=700,height=540,left=20,top=5,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=no');
}

function loan()
{
window.open('http://www.rvhotlinecanada.com/generic/lcalc.asp?textcolor=F5F5FA&textcolor2=0D206E','lcalc','width=430,height=420,left=20,top=20,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
}

function exchange()
{
window.open('http://www.tdcommercialbanking.com/foreignx/calc.html','exchange','width=450,height=450,left=20,top=20,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
}

function loan()
{
window.open('http://www.rvhotlinecanada.com/generic/lcalc.asp?textcolor=F5F5FA&textcolor2=0D206E','lcalc','width=430,height=420,left=20,top=20,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function metric()
{
window.open('http://www.rvhotlinecanada.com/generic/calculators/metric.asp?textcolor=F5F5FA&textcolor2=0D206E','lcalc','width=430,height=420,left=20,top=20,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
}


function hotline(NEWURL) {
  hotwindow = window.open(NEWURL,"hwindow","toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=540,height=450,left=20,top=20");
}


var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-5164634-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

function recordOutboundLink(link, category, action) {
_gat._getTrackerByName()._trackEvent(category, action);
setTimeout('document.location = "' + link.href + '"', 100);
}

