<!--
function maillink(lhs,rhs)
{
document.write("<A HREF=\"mailto");
document.write(":" + lhs + "@");
document.write(rhs + "\">" + lhs + "@" + rhs + "<\/a>");
}

function proceed(by)	{
BY = /^(.+)\*(.+)$/;
var launch = by.replace(BY,"mailto:$1@$2");
window.location = launch;
}

function popUp(url){
window.open(url,'pop','width=600,height=400,status=yes,resizable=yes,scrollbars=no,top=40,left=50');
}

// portfolio switch
function swap(){
  if (document.images) {
  for (var i=0; i<swap.arguments.length; i+=2){
      document[swap.arguments[i]].src = eval(swap.arguments[i+1] + ".src");
    }
    }
    }
if (document.images) {
// hotel & winary
	photoDefault = new Image();
	photoDefault.src = "images/2007_outside_01.jpg";
	
	photo1 = new Image();
	photo1.src = "images/exterior.jpg";
	photo2 = new Image();
	photo2.src = "images/entrance.jpg";
	photo3 = new Image();
	photo3.src = "images/cross-shot-complex.jpg";
	photo4 = new Image();
	photo4.src = "images/lr.jpg";
	photo5 = new Image();
	photo5.src = "images/kitchen.jpg";
	photo6 = new Image();
	photo6.src = "images/dr.jpg";
	photo7 = new Image();
	photo7.src = "images/lr2.jpg";
	photo8 = new Image();
	photo8.src = "images/lr3.jpg";
	
	
	photo9 = new Image();
	photo9.src = "images/bath.jpg";
	photo10 = new Image();
	photo10.src = "images/pool-spa.jpg";
	photo11 = new Image();
	photo11.src = "images/pool.jpg";
	photo12 = new Image();
	photo12.src = "images/weightroom.jpg";
	photo13 = new Image();
	photo13.src = "images/exterior2.jpg";
	photo14 = new Image();
	photo14.src = "images/exterior3.jpg";
	photo15 = new Image();
	photo15.src = "images/villa.jpg";
	photo16 = new Image();
	photo16.src = "images/villa2.jpg";
	
	
	photo17 = new Image();
	photo17.src = "images/interior1.jpg";
	photo18 = new Image();
	photo18.src = "images/interior2.jpg";
	photo19 = new Image();
	photo19.src = "images/interior3.jpg";
	photo20 = new Image();
	photo20.src = "images/interior4.jpg";
	photo21 = new Image();
	photo21.src = "images/interior5.jpg";
	photo22 = new Image();
	photo22.src = "images/new-blinds.jpg";
	photo23 = new Image();
	photo23.src = "images/new-blinds-open.jpg";
	photo24 = new Image();
	photo24.src = "images/new-blinds-closed.jpg";	
	
}

//pop Images
PositionX = 10;
PositionY = 10;
defaultWidth  = 100;
defaultHeight = 100;

//kinda important
var AutoClose = true;

//don't touch
function popImage(imageURL,imageTitle){
	var imgWin = window.open('','_blank','scrollbars=no,resizable=1,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY);
	if( !imgWin ) { return true; } //popup blockers should not cause errors
	imgWin.document.write('<html><head><title>'+imageTitle+'<\/title><script type="text\/javascript">\n'+
		'function resizeWinTo() {\n'+
		'if( !document.images.length ) { document.images[0] = document.layers[0].images[0]; }'+
		'var oH = document.images[0].height, oW = document.images[0].width;\n'+
		'if( !oH || window.doneAlready ) { return; }\n'+ //in case images are disabled
		'window.doneAlready = true;\n'+ //for Safari and Opera
		'var x = window; x.resizeTo( oW + 200, oH + 200 );\n'+
		'var myW = 0, myH = 0, d = x.document.documentElement, b = x.document.body;\n'+
		'if( x.innerWidth ) { myW = x.innerWidth; myH = x.innerHeight; }\n'+
		'else if( d && d.clientWidth ) { myW = d.clientWidth; myH = d.clientHeight; }\n'+
		'else if( b && b.clientWidth ) { myW = b.clientWidth; myH = b.clientHeight; }\n'+
		'if( window.opera && !document.childNodes ) { myW += 16; }\n'+
		'x.resizeTo( oW = oW + ( ( oW + 200 ) - myW ), oH = oH + ( (oH + 200 ) - myH ) );\n'+
		'var scW = screen.availWidth ? screen.availWidth : screen.width;\n'+
		'var scH = screen.availHeight ? screen.availHeight : screen.height;\n'+
		'if( !window.opera ) { x.moveTo(Math.round((scW-oW)/2),Math.round((scH-oH)/2)); }\n'+
		'}\n'+
		'<\/script>'+
		'<\/head><body onload="resizeWinTo();"'+(AutoClose?' onblur="self.close();"':'')+'>'+
		(document.layers?('<layer left="0" top="0">'):('<div style="position:absolute;left:0px;top:0px;display:table;">'))+
		'<img src='+imageURL+' alt="Loading image ..." title="" onload="resizeWinTo();">'+
		(document.layers?'<\/layer>':'<\/div>')+'<\/body><\/html>');
	imgWin.document.close();
	if( imgWin.focus ) { imgWin.focus(); }
	return false;
}
//-->
