<!--
var currentImageNum = 0;
function showVideo(elem){
	var videoDiv = document.getElementById("videoDiv");
	elem.style.display = "none";
	videoDiv.style.display = "inline";
	flowplayer("player", "../flash/flowplayer-3.1.4.swf");
}
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		about_over = newImage("images/nav_aboutMariann-over.gif");
		properties_over = newImage("images/nav_featuredProperties-over.gif");
		searchMLS_over = newImage("images/nav_searchSoCalMLS-over.gif");
		realEstateInfo_over = newImage("images/nav_realEstateInfo-over.gif");
		freeReports_over = newImage("images/nav_freeReports-over.gif");
		financing_over = newImage("images/nav_financing-over.gif");
		mortgage_over = newImage("images/nav_mortgageCalc-over.gif");
		localInfo_over = newImage("images/nav_localInfo-over.gif");
		schoolInfo_over = newImage("images/nav_schoolInfo-over.gif");
		consumerLinks_over = newImage("images/nav_consumerLinks-over.gif");
		favLinks_over = newImage("images/nav_favoriteLinks-over.gif");
		contact_over = newImage("images/nav_contact-over.gif");
		home_over = newImage("images/nav_home-over.gif");
		preloadFlag = true;
	}
}

function setStatus(statusText){
    window.status = statusText;
}

function openMLS(){
	//void(window.open("searchMLS.htm","MLSsearch","width=1000,height=800,addressbar=no,scrollbars=yes"));
    void(window.open("http://idx.diversesolutions.com/search/68/64","MLSsearch","width=1000,height=800,addressbar=no,scrollbars=yes"));
}
function openMLSproperty(link){
    void(window.open(link,"MLSPropertyInfo","width=1000,height=800,addressbar=no,scrollbars=yes"));
}

function openPropertySchools(url){
    var qString = "?a=" + url;
	var newWindow = window.open("propertySchoolInfo.htm" + qString,"Schools","width=777,height=550,addressbar=no,scrollbars=yes");
	//newWindow.document.getElementById("url").value = url;
	return false;
}

function openMap(url){
    var qString = "?a=" + url;
	var newWindow = window.open("map.htm" + qString,"Schools","width=777,height=550,addressbar=no,scrollbars=yes");
	//newWindow.window.frames["mapFrame"].location = url;
	return false;
}

function openSchools(){
	window.open("schoolInfo.htm","Schools","width=777,height=550,addressbar=no,scrollbars=yes");
}

function openFinancing(){
	window.open("financing.htm","Financing","width=777,height=550,addressbar=no,scrollbars=yes");
}

function backFromPopup(){
	if(window.opener.closed == false){
		window.close();
		window.opener.focus();
	}else if(window.opener.closed == true){
		window.open("index.htm");
		window.close();
	}
}

function openVirtualTour(url){
	window.open(url,"","width=426,height=389,addressbar=no,resizeable=no");
}

function openMortCalc(price){
	var newWindow = window.open("miniCalc.htm?price=" + price,"calc","width=500,height=290,addressbar=no,resizeable=no");
	newWindow.document.getElementById("LOAN").value = price;
}

function openPropertyPhotos(propNum){
	window.open("photos_" + propNum + ".htm","calc","width=500,height=400,addressbar=no,resizeable=no");
}
function openDynamicPhotos(propNum, totalPhotos){
	window.open("photos.htm?mlsNum=" + propNum + "&photoCount=" + totalPhotos,"calc","width=500,height=400,addressbar=no,resizeable=no");
}
function nextImage(dir, total, propNum){
	clearImageNum();
	var imgTag = document.getElementById("photoSpot").innerHTML;
	imgNumStart = imgTag.indexOf("_") + 1;
	imgNumEnd = imgTag.lastIndexOf(".");
	imgNum = imgTag.substring(imgNumStart, imgNumEnd);
	
	if(dir == 0){
		nextImgNum = parseInt(imgNum) - 1;
	}else{
		nextImgNum = parseInt(imgNum) + 1;
	}
	
	if(nextImgNum < 1){nextImgNum = total}
	if(nextImgNum > total){nextImgNum = 1}
	
	document.getElementById("photoSpot").innerHTML = "<img src=\"images/properties/" + propNum + "_" + nextImgNum + ".jpg\" name=\"thePhoto\">";
	showImageNum(nextImgNum);
}
function nextImage2(dir, total, propNum){
	clearImageNum2(currentImageNum);
	var imgTag = document.getElementById("photoSpot").innerHTML;
	imgNumStart = imgTag.indexOf("_") + 1;
	imgNumEnd = imgTag.lastIndexOf(".");
	imgNum = currentImageNum;
	
	if(dir == 0){
		nextImgNum = parseInt(imgNum) - 1;
	}else{
		nextImgNum = parseInt(imgNum) + 1;
	}
	
	if(nextImgNum < 0){nextImgNum = total - 1}
	if(nextImgNum > (total - 1)){nextImgNum = 0}

	currentImageNum = nextImgNum;
	document.getElementById("photoSpot").innerHTML = "<img src=\"http://idx.diversesolutions.com/photos/285/" + propNum + "/" + nextImgNum + "/full.aspx\" name=\"thePhoto\">";
	showImageNum(nextImgNum);
}

function gotoImage(imgNum, propNum){
	clearImageNum();
	document.getElementById("photoSpot").innerHTML = "<img src=\"images/properties/" + propNum + "_" + imgNum + ".jpg\" name=\"thePhoto\">";
	showImageNum(imgNum);
}
function gotoImage2(imgNum, propNum){
	clearImageNum2(currentImageNum);
	currentImageNum = imgNum;
	document.getElementById("photoSpot").innerHTML = "<img src=\"http://idx.diversesolutions.com/photos/285/" + propNum + "/" + imgNum +"/full.aspx\" name=\"thePhoto\">";
	showImageNum(imgNum);
}

function clearImageNum(){
	var imgTag = document.getElementById("photoSpot").innerHTML;
	imgNumStart = imgTag.indexOf("_") + 1;
	imgNumEnd = imgTag.lastIndexOf(".");
	oldImgNum = imgTag.substring(imgNumStart, imgNumEnd);
	theLink = "lnk" + oldImgNum;
	document.getElementById(theLink).style.fontWeight = "normal";
	document.getElementById(theLink).style.color = "#71490a";
}
function clearImageNum2(imageNumb){
	var imgTag = document.getElementById("photoSpot").innerHTML;
	imgNumStart = imgTag.indexOf("_") + 1;
	imgNumEnd = imgTag.lastIndexOf(".");
	oldImgNum = currentImageNum;
	if(imageNumb == 0)
	{
	    theLink = "lnk" + 0
	}
	else
	{
	    theLink = "lnk" + (imageNumb);
	}
	document.getElementById(theLink).style.fontWeight = "normal";
	document.getElementById(theLink).style.color = "#71490a";
}

function showImageNum(imgNum){
	theLink = "lnk" + imgNum;
	document.getElementById(theLink).style.fontWeight = "bold";
	document.getElementById(theLink).style.color = "#000000";
}

function scheduleShowing(prop){
	var newWindow = window.open("scheduleShowing.htm?prop=" + prop,"schedShow","width=500,height=370,addressbar=no,resizeable=no");
	//newWindow.document.getElementById("displayAddress").innerHTML = prop;
	//newWindow.document.getElementById("Property_Address").value = prop;
}

function emailListing(prop){
	//msgBody = "I found a great property that I think you will be interested in. Check it out at http://www.marianncordova.com/property" + prop + ".htm";
	var newWindow = window.open("emailListing.htm?prop=" + prop,"emailListing","width=500,height=360,addressbar=no,resizeable=no");
	//newWindow.document.getElementById("Message").value = msgBody;
}
function emailListing2(prop){
	//msgBody = "I found a great property that I think you will be interested in. Check it out at http://www.marianncordova.com/property" + prop + ".htm";
	var newWindow = window.open("emailProperty.htm?prop=" + prop,"emailListing","width=500,height=360,addressbar=no,resizeable=no");
	//newWindow.document.getElementById("Message").value = msgBody;
}
function requestMoreInfo(address){
	document.location = "requestMoreInfo.htm?address=" + address;
}

function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function createCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/; domain=cotodecazaliving.com";
}

function checkCookies(page, address){
	var name = readCookie('cordova_name');
	var email = readCookie('cordova_email');
	if(name == "" || name == null || email == "" || email == null){
		document.location = "guestbook.htm?page=" + page + "&address=" + address;
	}
}
function checkCookiesNew(num){
	var name = readCookie('cordova_name');
	var email = readCookie('cordova_email');
	if(name == "" || name == null || email == "" || email == null){
		document.location = "guestbook.htm?mlsnum=" + num;
	}
}
var qsParm = new Array();
function qs() {
var query = window.location.search.substring(1);
var parms = query.split('&');
for (var i=0; i<parms.length; i++) {
   var pos = parms[i].indexOf('=');
   if (pos > 0) {
      var key = parms[i].substring(0,pos);
      var val = parms[i].substring(pos+1);
      qsParm[key] = val;
      }
   }
}
qs();
// -->
