function popUpWindow(url) {
sWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=680,height=310');
self.name = "mainWin";
}


function checkDates2(form) { inday = form.inday[form.inday.selectedIndex].value; inmonth = form.inmonth[form.inmonth.selectedIndex].value; inyear = form.inyear[form.inyear.selectedIndex].value; outday = form.outday[form.outday.selectedIndex].value; outmonth = form.outmonth[form.outmonth.selectedIndex].value; outyear = form.outyear[form.outyear.selectedIndex].value; d1 = new Date(inyear,inmonth-1,inday); d2 = new Date(inyear,inmonth-1,1); d3 = new Date(outyear,outmonth-1,outday); d4 = new Date(); d5 = new Date(d4.getFullYear(),d4.getMonth(),d4.getDate()); 
   

message = ""; window.status = outyear + "-" + outmonth + "-" + outday + " = " + d3; if (d1.getMonth() != d2.getMonth()) { message += "* Your check-in date is not valid.\n"; } if (d1.getTime() >= d3.getTime()) { message += "* Your check-out date must not be the same, or before your check-in date.\n"; } if (d1.getTime() < d5.getTime()) { message += "* Your check-in date may not be before today.\n"; } if (message.length > 0) { alert("Please address the following errors:\n" + message); return false; } return true; } function doSO(f,tV,tF){for(i=0;i<f[tF].options.length;i++)if(f[tF].options[i].value==tV){f[tF].options[i].selected=true;}} 

function dateChange2(f) 
{ 
thisdate = new Date(); 
msecs = (thisdate-0); 
oneday = new Date(msecs+86400000*1); 
imnow = oneday.getMonth()+1; 


imv = f.inmonth[f.inmonth.selectedIndex].value;
omv = f.inmonth[f.outmonth.selectedIndex].value;

if (imnow > imv )
{
 f.inyear.selectedIndex =1;
 f.outyear.selectedIndex =1;
}
else
{
 f.inyear.selectedIndex =0;
 f.outyear.selectedIndex =0;
}




thisdate = new Date(f.inyear[f.inyear.selectedIndex].value, f.inmonth[f.inmonth.selectedIndex].value-1, f.inday[f.inday.selectedIndex].value); msecs = (thisdate-0); twoday = new Date(msecs+(86400000*2)); im = thisdate.getMonth()+1; id = thisdate.getDate(); iy = thisdate.getFullYear(); om = twoday.getMonth()+1; od = twoday.getDate(); oy = twoday.getFullYear(); doSO(f,im,"inmonth"); doSO(f,id,"inday"); doSO(f,iy,"inyear"); doSO(f,om,"outmonth"); doSO(f,od,"outday"); doSO(f,oy,"outyear"); } 

function initializeDates(f) { thisdate = new Date(); 
thisdate = new Date(thisdate.getFullYear(),thisdate.getMonth(),thisdate.getDate()); 
msecs = (thisdate-0); 
oneday = new Date(msecs+86400000*1); twoday = new Date(msecs+(86400000*3)); 
im = oneday.getMonth()+1; 
id = oneday.getDate(); 
iy = oneday.getFullYear(); 

        
        var idatevalue = (im < 9 ? '0' : '') + (im) + "/"
		+ (id < 10 ? '0' : '') + id + "/"
		+ iy;
		
                

om = twoday.getMonth()+1; 
od = twoday.getDate(); 
oy = twoday.getFullYear(); 

        var odatevalue = (om < 9 ? '0' : '') + (om) + "/"
		+ (od < 10 ? '0' : '') + od + "/"
		+ oy;
		
        document.tv.arrivedate.value = idatevalue;
        document.tv.leavedate.value = odatevalue;


doSO(f,im,"inmonth"); doSO(f,id,"inday"); 
doSO(f,iy,"inyear"); 
doSO(f,om,"outmonth"); 
doSO(f,od,"outday"); 
doSO(f,oy,"outyear"); temponload(); } 

function i4init() { if (document.tv) { initializeDates(document.tv); } if (document.th) {initializeDates(document.th);} } temponload = (window.onload) ? window.onload : new Function; window.onload=i4init;





var url = "http://www.lasvegasdirect.com"; 
var title = "Las Vegas Direct"; 

function makeLink(){ 
if(document.all) 
window.external.AddFavorite(url,title) 
} 



function openWin(url,h,w,t,l){
  newWin = window.open(url,'','height='+h+',width='+w+',top='+t+',left='+l+',scrollbars=no,location=no,status=no');
}



function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=650,height=300,scrollbars=no');
return false;
}

