function email_agent()
	{
    popupWin = window.open('','pocus','scrollbars=no, hotkeys=no');
    popupWin.focus();
    popupWin.moveTo(0,0)
    popupWin.resizeTo(screen.width,screen.height);
    popupWin.location='/customer.app?property_id={/literal}{$property_id}{literal}&&agent_id={/literal}{$agent_id}{literal}';
	}

function popimg()
	{
    if (pic_location_c.length){
	open_window('/thumb_view_rob.app?w=c&&property_id={/literal}{$property_id}{literal}&more=1&&pnum='+image_id[0], 'thumbnails', 750, 500, 'yes', 'yes');
    }
	}


function slide_show(property_id,image_id)
{
	window.open('/thumb_view_rob.app?property_id=' + property_id + '&pnum=' + image_id, 'SlideShow' + property_id, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=yes,width='+screen.width+',height='+screen.height);
}


function open_window(link, title, width, height, scrollbars, resizable){
	//alert(link+', '+title);
	window.open(link, title, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+scrollbars+',resizable='+resizable+',copyhistory=yes,width='+width+',height='+height);
}
var SlideShowSpeed = 6000;
var CrossFadeDuration = 5;
var Picture = new Array(); 
for (i=0; i<pic_location_c.length; i++){
Picture[i] = pic_location_c[i];
}
var tss;
var iss;
var jss = 0;
var pss = Picture.length-1;
var preLoad = new Array();
//document.image.PictureBox.src = Picture[0].src;
function preload_images()
{
for (iss = 0; iss < (pss+1); iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}
}
function runSlideShow(){

if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
jss = jss + 1;
if (jss > (pss)) jss=0;
tss = setTimeout('runSlideShow()', SlideShowSpeed);
}
