//Dreamweaver Behaviors
function MM_swapImgRestore() { //v3.0
  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_preloadImages() { //v3.0
  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_findObj(n, d) { //v4.01
  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() { //v3.0
  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 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 MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
	MM_preloadImages('/images/template/lodging-hotline-over.gif');
	MM_preloadImages('/images/template/ql-chat-over.gif');
	MM_preloadImages('/images/template/ql-lodging-over.gif');
	MM_preloadImages('/images/template/ql-guide-over.gif');
	MM_preloadImages('/images/template/ql-maps-over.gif');
	MM_preloadImages('/images/template/nav-about-over.gif');
	MM_preloadImages('/images/template/nav-lodging-over.gif');
	MM_preloadImages('/images/template/nav-things-over.gif');
	MM_preloadImages('/images/template/nav-dining-over.gif');
	MM_preloadImages('/images/template/nav-visitors-over.gif');
	MM_preloadImages('/images/template/nav-planners-over.gif');
	MM_preloadImages('/images/template/nav-newcomers-over.gif');
	MM_preloadImages('/images/template/nav-films-over.gif');
	MM_preloadImages('/images/template/nav-media-over.gif');
	MM_preloadImages('/images/template/widget-hotel.jpg');
	MM_preloadImages('/images/template/widget-air.jpg');
	MM_preloadImages('/images/template/widget-car.jpg');
	MM_preloadImages('/images/template/widget-packages.jpg');
	MM_preloadImages('/images/template/nav-live-over.jpg');
	MM_preloadImages('/images/template/nav-learn-over.jpg');
	MM_preloadImages('/images/template/nav-believe-over.jpg');
	MM_preloadImages('/images/template/nav-engage-over.jpg');


function translate()
   {
   var w = document.langForm.langOptions.selectedIndex;
   var url_add = document.langForm.langOptions.options[w].value;
   window.location.href = url_add;
   }

function specialButton() {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="188" height="40" id="DCVBButton" align="middle" class="floatRight">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="/images/flashbutton/DCVBButton.swf?xmlurl=/images/flashbutton/data.xml" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#530D01" />');
	document.write('<embed src="/images/flashbutton/DCVBButton.swf?xmlurl=/images/flashbutton/data.xml" quality="high" bgcolor="#530D01" width="188" height="40" name="DCVBButton" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
	
function homepageFlash() {
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="551" height="361" >\n');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
    document.write('<param name="movie" value="/images/flash/dcvb-homepage.swf?bannerxml=/images/flash/data.xml" />\n');
    document.write('<param value="high" name="quality" />\n');
    document.write('<embed pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowscriptaccess="sameDomain" width="551" height="361" quality="high" src="/images/flash/dcvb-homepage.swf?bannerxml=/images/flash/data.xml" />\n');
    document.write('</object>\n');
}

function calendar() {
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="234" height="136" id="Durhamnc" align="middle" >\n');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="/calendar/DurhamncCalendar.swf" /><param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#B98A57" />');
	document.write('<embed src="/calendar/DurhamncCalendar.swf" quality="high" bgcolor="#B98A57" width="234" height="136" name="Durhamnc" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

function backButton() {
	document.write('<a href="javascript:history.go(-1);" onmouseover="self.status=document.referrer;return true;">&lt;&lt; Go Back</a>');
	}

function searchAppliance() {
	document.write('<form method="get" action="http://searchdurham-nc.com/search">');
    document.write('<input type="hidden" name="site" value="default_collection" />');
    document.write('<input type="hidden" name="client" value="default_frontend" />');
    document.write('<input type="hidden" name="proxystylesheet" value=" default_frontend" />');
    document.write('<input type="hidden" name="output" value="xml_no_dtd" />');
    document.write('<input name="q" type="text" id="query" value="" />');
	document.write('<input name="btnG" type="image" id="Search" value="Google Search" src="http://www.durham-nc.com/images/template/go-button.gif" alt="Go" />');
    document.write('</form>');
	}

function initDate()
{
	var now = new Date();
	var mth = now.getMonth();
	var dd = now.getDate();
	var yy = now.getFullYear();
	if (mth <10)
	{
		mth == 0 + mth;
	}
	if (dd <10)
	{
		dd == 0 + dd;
	}
	if ((mth==11) && (dd>=29)) {
/*		document.resrvForm.doa_mm.selectedIndex = mth;
		document.resrvForm.doa_dd.selectedIndex = dd - 1;
		document.resrvForm.dod_yy.value= yy;
		document.resrvForm.dod_dd.selectedIndex = dd - dd;
		document.resrvForm.dod_mm.selectedIndex = mth-mth;
		document.resrvForm.dod_yy.value= yy+1;*/
		document.getElementById('CB_frommonth').selectedIndex = mth;
		document.getElementById('CB_fromdate').selectedIndex = dd - 1;
		document.getElementById('CB_todate').selectedIndex = dd - dd;
		document.getElementById('CB_tomonth').selectedIndex = mth-mth;
		document.getElementById('AIR_frommonth').selectedIndex = mth;
		document.getElementById('AIR_fromdate').selectedIndex = dd - 1;
		document.getElementById('AIR_todate').selectedIndex = dd - dd;
		document.getElementById('AIR_tomonth').selectedIndex = mth-mth;
		document.getElementById('CAR_frommonth').selectedIndex = mth;
		document.getElementById('CAR_fromdate').selectedIndex = dd - 1;
		document.getElementById('CAR_todate').selectedIndex = dd - dd;
		document.getElementById('CAR_tomonth').selectedIndex = mth-mth;
	}
	else if ((dd>=29 ) || ((dd>=27 ) && (mth==1)))
	{
/*		document.resrvForm.doa_mm.selectedIndex = mth+1;
		document.resrvForm.doa_dd.selectedIndex = dd-dd;
		document.resrvForm.doa_yy.value= yy;
		document.resrvForm.dod_dd.selectedIndex = (dd-dd)+1;
		document.resrvForm.dod_mm.selectedIndex = mth + 1;
		document.resrvForm.dod_yy.value= yy;*/
		document.getElementById('CB_frommonth').selectedIndex = mth+1;
		document.getElementById('CB_fromdate').selectedIndex = dd-dd;
		document.getElementById('CB_todate').selectedIndex = (dd-dd)+1;
		document.getElementById('CB_tomonth').selectedIndex = mth + 1;
		document.getElementById('AIR_frommonth').selectedIndex = mth+1;
		document.getElementById('AIR_fromdate').selectedIndex = dd-dd;
		document.getElementById('AIR_todate').selectedIndex = (dd-dd)+1;
		document.getElementById('AIR_tomonth').selectedIndex = mth + 1;
		document.getElementById('CAR_frommonth').selectedIndex = mth+1;
		document.getElementById('CAR_fromdate').selectedIndex = dd-dd;
		document.getElementById('CAR_todate').selectedIndex = (dd-dd)+1;
		document.getElementById('CAR_tomonth').selectedIndex = mth + 1;
	}
	else
	{
/*		document.resrvForm.doa_mm.selectedIndex=mth;
		document.resrvForm.doa_dd.selectedIndex=dd+1;
		document.resrvForm.dod_yy.value= yy;
		document.resrvForm.dod_mm.selectedIndex=mth;
		document.resrvForm.dod_dd.selectedIndex=dd+3;
		document.resrvForm.dod_yy.value= yy;*/
		document.getElementById('CB_frommonth').selectedIndex=mth;
		document.getElementById('CB_fromdate').selectedIndex=dd-1;
		document.getElementById('CB_tomonth').selectedIndex=mth;
		document.getElementById('CB_todate').selectedIndex=dd+1;
		document.getElementById('AIR_frommonth').selectedIndex=mth;
		document.getElementById('AIR_fromdate').selectedIndex=dd-1;
		document.getElementById('AIR_tomonth').selectedIndex=mth;
		document.getElementById('AIR_todate').selectedIndex=dd+1;
		document.getElementById('CAR_frommonth').selectedIndex=mth;
		document.getElementById('CAR_fromdate').selectedIndex=dd-1;
		document.getElementById('CAR_tomonth').selectedIndex=mth;
		document.getElementById('CAR_todate').selectedIndex=dd+1;
	}
}

