// JavaScript Document
function clearTextbox(obj, dvalue){
	if(obj.value == dvalue){
		obj.value=''; 
		obj.style.color='#000';
	}
}
function fillTextboxBack(obj, dvalue){
	if(obj.value == ''){
		obj.value=dvalue; 
		obj.style.color='#666';
	}
}

function goNext(current, curlength, nextTb){
	curlength +=1;
	document.forms['fullquote'].day2.setAttribute('autocomplete','off');
	document.forms['fullquote'].day3.setAttribute('autocomplete','off');
	document.forms['fullquote'].day4.setAttribute('autocomplete','off');
	document.forms['fullquote'].cell2.setAttribute('autocomplete','off');
	document.forms['fullquote'].cell3.setAttribute('autocomplete','off');
	if(current.value.length == curlength-1){
		if(nextTb == "12"){document.forms['fullquote'].day2.focus();}
		if(nextTb == "13"){document.forms['fullquote'].day3.focus();}
		if(nextTb == "14"){document.forms['fullquote'].day4.focus();}
		if(nextTb == "22"){document.forms['fullquote'].cell2.focus();}
		if(nextTb == "23"){document.forms['fullquote'].cell3.focus();}
	}
}
function goNextBook(current, curlength, nextTb){
	curlength +=1;
	document.forms['booking'].day2.setAttribute('autocomplete','off');
	document.forms['booking'].day3.setAttribute('autocomplete','off');
	document.forms['booking'].day4.setAttribute('autocomplete','off');
	document.forms['booking'].cell2.setAttribute('autocomplete','off');
	document.forms['booking'].cell3.setAttribute('autocomplete','off');
	if(current.value.length == curlength-1){
		if(nextTb == "12"){document.forms['booking'].day2.focus();}
		if(nextTb == "13"){document.forms['booking'].day3.focus();}
		if(nextTb == "14"){document.forms['booking'].day4.focus();}
		if(nextTb == "22"){document.forms['booking'].cell2.focus();}
		if(nextTb == "23"){document.forms['booking'].cell3.focus();}
	}
}

function getCurrentYear(){
	year = (new Date()).getYear();
	if(year<1900){year+=1900;}
	//document.write(year);
	return year;
}

function showFlash(o){
	var bg,q,s,v,m,w;
	if(o.bgcolor){bg=o.bgcolor;}else{bg="#000000";}
	if(o.quality){q=o.quality;}else{q="high";}
	if(o.scale){s=o.scale;}else{s="noscale";}
	if(o.ver){v=o.ver;}else{v=6;}
	if(o.menu){m=o.menu;}else{m="true";}
    if(o.wmode){w=o.wmode;}else{w="default";}
	var str='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+v+',0,0,0" ';
	str+='id="'+o.id+'" ';
	if(o.base){str+='base="'+o.base+'" ';}
	if(o.aligh){str+='aligh="'+o.aligh+'" ';}
	str+='width="'+o.width+'" height="'+o.height+'"><param name="movie" value="'+o.name+'"/><param name="bgcolor" value="'+bg+'"/><param name="quality" value="'+q+'"/><param name="menu" value="'+m+'"/><param name="wmode" value="'+w+'"/>';
	if(o.flashvars){str+='<param name="flashvars" value="'+o.flashvars+'"/>';}
	if(o.salign){str+='<param name="salign" value="'+o.salign+'"/>';}
	str+='<param name="scale" value="'+s+'"/><embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" id="'+o.id+'-embed" src="'+o.name+'" bgcolor="'+bg+'" wmode="'+w+'" ';
	if(o.flashvars){str+='flashvars="'+o.flashvars+'" ';}
	str+='quality="'+q+'" ';
	if(o.base){str+='base="'+o.base+'" ';}
	if(o.salign){str+='salign="'+o.salign+'" ';}
	str+='scale="'+s+'" width="'+o.width+'" height="'+o.height+'"></embed></object>';
	document.writeln(str);
}

