//location popup
function locations() {
	
	var overlayHeight;
	var wholescreen = screen.availHeight;
	var wholepage = document.getElementById('page').offsetHeight;
	
	if (wholepage < wholescreen) {
		overlayHeight = wholescreen;
	} else {
		overlayHeight = wholepage;
	}
	
	var newdiv = document.createElement('div');
	newdiv.setAttribute('id', 'coverpage');
	newdiv.style.position = 'absolute';
	newdiv.style.top = '0px';
	newdiv.style.left = '0px';
	newdiv.style.zIndex = '15';
	newdiv.style.width = '100%';
	newdiv.style.height = overlayHeight + 'px';
 	newdiv.style.background = "#000";
	newdiv.style.opacity = 0.8;
	newdiv.style.filter = 'alpha(opacity=80)';
 	newdiv.className = "opac80";
 	document.body.appendChild(newdiv);
 	
 	var addthisdiv = document.createElement('div');
	addthisdiv.setAttribute('id', 'poplayer');
	addthisdiv.style.position = 'absolute';
	addthisdiv.style.top = '200px';
	addthisdiv.style.left = '50%';
	addthisdiv.style.marginLeft = '-200px';
	addthisdiv.style.zIndex = '20';
	addthisdiv.style.width = '300px';
	addthisdiv.style.padding = '10px';
	addthisdiv.style.background = "#e4eac1";
	
	var z;
	//z = '<form method="post" id="petselect" action="">'; // START FORM
	z = '<table class="forgot-pass" >';
	z += '<tr>';
		z += '<td align="left"><h3>Pick-Up/Drop-Off Locations</h3></td>';
		z += '<td align="right"><a href="#" onclick="hideDivPop()"><img src="img/b_xout.jpg" style="float:right;" alt="" /></a></td>';
	z += '</tr>';
	
	z += '<tr>';
		z += '<td colspan="2">&nbsp;</td>';
	z += '</tr>';
	
	z += '<tr>';
		z += '<td colspan="2"><b>List of Cities:</b><br /></td>';
	z += '</tr>';
	
	z += '<tr>';
		z += '<td colspan="2">&nbsp;</td>';
	z += '</tr>';
	
	z += '<tr>';
		z += '<td colspan="2">';
			z += '<table width="80%" align="center">';
				z += '<tr>';
					z += '<td width="50%"><div class="arial-norm">&#8226; Fairfax</div></td>';
					z += '<td><div class="arial-norm">&#8226; Ross</div></td>';
				z += '</tr>';
				z += '<tr>';
					z += '<td width="50%"><div class="arial-norm">&#8226; Kentfield</div></td>';
					z += '<td><div class="arial-norm">&#8226; San Anselmo</div></td>';
				z += '</tr>';
				z += '<tr>';
					z += '<td width="50%"><div class="arial-norm">&#8226; Larkspur</div></td>';
					z += '<td><div class="arial-norm">&#8226; San Rafael</div></td>';
				z += '</tr>';
				z += '<tr>';
					z += '<td width="50%"><div class="arial-norm">&#8226; Marin City</div></td>';
					z += '<td><div class="arial-norm">&#8226; Sausalito</div></td>';
				z += '</tr>';
				z += '<tr>';
					z += '<td width="50%"><div class="arial-norm">&#8226; Mill Valley</div></td>';
					z += '<td><div class="arial-norm">&#8226; Tiburon</div></td>';
				z += '</tr>';
			z += '</table>';
		z += '</td>';
	z += '</tr>';
	z += '</table>';
	
	addthisdiv.innerHTML = z;
 	document.body.appendChild(addthisdiv);
}

// REMOVE COVER-UP AND POPUP
function hideDivPop() {
	var coverit = document.getElementById('coverpage');
	var showmovie = document.getElementById('poplayer');
	
	document.body.removeChild(coverit);
	document.body.removeChild(showmovie);
}

//start estimate cost popup for deluxe bath

function setOpacityI( value ) {
 document.getElementById("popup_style_deluxeBath").style.position = 'absolute';
 document.getElementById("popup_style_deluxeBath").style.top = '200px';
 document.getElementById("popup_style_deluxeBath").style.left = '50%';
 document.getElementById("popup_style_deluxeBath").style.zIndex = '50';
 document.getElementById("popup_style_deluxeBath").style.padding = '10px';
 document.getElementById("popup_style_deluxeBath").style.background = '#e4eac1';
 document.getElementById("popup_style_deluxeBath").style.opacity = value / 10;
 document.getElementById("popup_style_deluxeBath").style.filter = 'alpha(opacity=' + value * 10 + ')';
}

function popup_open() {
 for( var i = 0 ; i <= 100 ; i++ )
   setTimeout( 'setOpacityI(' + (i / 10) + ')' , 8 * i );
}

function popup_out() {
 for( var i = 0 ; i <= 100 ; i++ ) {
   setTimeout( 'setOpacityI(' + (10 - i / 10) + ')' , 8 * i );
 }

 setTimeout('popup_close()', 800 );
}

function popup_close() {
 document.getElementById("popup_style_deluxeBath").style.display = "none";
 var coverit = document.getElementById('coverpage');
	
	document.body.removeChild(coverit);
}

function popup_deluxeBath() {
	var overlayHeight;
	var wholescreen = screen.availHeight;
	var wholepage = document.getElementById('page').offsetHeight;
	
	if (wholepage < wholescreen) {
		overlayHeight = wholescreen;
	} else {
		overlayHeight = wholepage;
	}
	var newdiv = document.createElement('div');
		newdiv.setAttribute('id', 'coverpage');
		newdiv.style.position = 'absolute';
		newdiv.style.top = '0px';
		newdiv.style.left = '0px';
		newdiv.style.zIndex = '15';
		newdiv.style.width = '100%';
		newdiv.style.height = overlayHeight + 'px';
	 	newdiv.style.background = "#000";
	 	newdiv.style.opacity = 0.8;
	 	newdiv.style.filter = 'alpha(opacity=80)';
	 	newdiv.className = "opac80";
	 	document.body.appendChild(newdiv);
 setOpacityI( 0 );
 document.getElementById("popup_style_deluxeBath").style.display = "block";
 popup_open();
}
//end estimate cost popup for deluxe bath

//start estimate cost popup for hair cut

function setOpacityII( value ) {
 document.getElementById("popup_style_hairCut").style.position = 'absolute';
 document.getElementById("popup_style_hairCut").style.top = '200px';
 document.getElementById("popup_style_hairCut").style.left = '50%';
 document.getElementById("popup_style_hairCut").style.zIndex = '20';
 document.getElementById("popup_style_hairCut").style.padding = '10px';
 document.getElementById("popup_style_hairCut").style.background = '#e4eac1';
 document.getElementById("popup_style_hairCut").style.opacity = value / 10;
 document.getElementById("popup_style_hairCut").style.filter = 'alpha(opacity=' + value * 10 + ')';
}

function popup_openII() {
 for( var i = 0 ; i <= 100 ; i++ )
   setTimeout( 'setOpacityII(' + (i / 10) + ')' , 8 * i );
}

function popup_outII() {
 for( var i = 0 ; i <= 100 ; i++ ) {
   setTimeout( 'setOpacityII(' + (10 - i / 10) + ')' , 8 * i );
 }

 setTimeout('popup_closeII()', 800 );
}

function popup_closeII() {
 document.getElementById("popup_style_hairCut").style.display = "none";
 var coverit = document.getElementById('coverpage');
	
	document.body.removeChild(coverit);
}

function popup_hairCut() {
	var overlayHeight;
	var wholescreen = screen.availHeight;
	var wholepage = document.getElementById('page').offsetHeight;
	
	if (wholepage < wholescreen) {
		overlayHeight = wholescreen;
	} else {
		overlayHeight = wholepage;
	}
	var newdiv = document.createElement('div');
		newdiv.setAttribute('id', 'coverpage');
		newdiv.style.position = 'absolute';
		newdiv.style.top = '0px';
		newdiv.style.left = '0px';
		newdiv.style.zIndex = '15';
		newdiv.style.width = '100%';
		newdiv.style.height = overlayHeight + 'px';
	 	newdiv.style.background = "#000";
	 	newdiv.style.opacity = 0.8;
	 	newdiv.style.filter = 'alpha(opacity=80)';
	 	newdiv.className = "opac80";
	 	document.body.appendChild(newdiv);
 setOpacityII( 0 );
 document.getElementById("popup_style_hairCut").style.display = "block";
 popup_openII();
}
//end estimate cost popup for hair cut