function initialize(glat,glng,gw,gh,gelm,gzoom) {
	if (GBrowserIsCompatible()) 
	{
	var map = new GMap2(document.getElementById(gelm),{ size: new GSize(gw,gh) });
        map.addControl(new GLargeMapControl3D());
        map.setCenter(new GLatLng(glat, glng), gzoom);

        var myIcon = new GIcon();
        myIcon.image = '/images/mapicon.png';
        myIcon.iconSize = new GSize(42,57);
        myIcon.shadow = '/images/mapiconshadow.png';
        myIcon.shadowSize = new GSize(71,57);
        myIcon.iconAnchor = new GPoint(21,57);
        myIcon.infoWindowAnchor = new GPoint(21,0);



	var point = new GLatLng(glat, glng);
	map.addOverlay(new GMarker(point, myIcon));

	}
}








function checked_count() {
	var j=0;
	var i=0;
	
	for(i=0; i<document.frm_compare.elements.length; i++) {
		if(document.frm_compare.elements[i].type == "checkbox") {
			if (document.frm_compare.elements[i].checked) {
				j++;
			}
			if(j>2) {
				
				break;
			}
		}
	}
	
	if (j > 2) {
		
		alert('Selected more than 2 properties.');
		return false;
	}
}

function validate_compare() {
	var i;
	var j=0;
	for(i=0; i<document.frm_compare.elements.length; i++) {
		if(document.frm_compare.elements[i].type == "checkbox") {
			if (document.frm_compare.elements[i].checked) {
				j++;
			}
			
		}
	}
	
	if (j < 2) {
		alert('Please select at least 2 properties.');
		return false;
	}
}

function viewWin(filename) {
	var mybars='width=717,height=556,directories=no,location=no,menubar=no,status=no,screenX=0,screenY=0';
	mybars+=',titlebar=no,toolbar=no';
	myoptions='scrollbars=yes,resizeable=yes';
	myfeatures=mybars+ ','+myoptions
	var newin=open(filename,'mydoc',myfeatures);
	return false;
}

var win = null;
var notavailable='N/A';

var picturenow=0;
var timerID = 0;
function show_picturebig(picture,locate)
{
  if (parseInt(picture)>=number) picture=0;
  if (parseInt(picture)<0) picture=number-1;
  picturenow=picture;
  document.getElementById('bigpicture0').src=picture_array[picture];
  document.getElementById('description0').innerHTML=picturestring_array[picture];
}
function show_picture(picture,locate)
{
  if (parseInt(picture)>=number) picture=0;
  if (parseInt(picture)<0) picture=number-1;
  picturenow=picture;
  var cx=310;
  var cy=150;
  if (locate==1){
        document.getElementById('galleryid').style.top=cy;
        document.getElementById('galleryid').style.left=cx;
  }
 // hideform(0);
  document.getElementById('galleryid').style.visibility='visible';
  document.getElementById('picture_layer').src=picture_array[picture];
  document.getElementById('picturenow').innerHTML=String(picture+1);
  document.getElementById('picture_string').innerHTML=picturestring_array[picture];
}
function start_slides(picture)
{
        var browserinfos=navigator.userAgent
        var ns4=document.layers
        var ns6=document.getElementById&&!document.all&&!browserinfos.match(/Opera/)
        var ie=document.all&&!browserinfos.match(/Opera/)
        var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
        var opera=browserinfos.match(/Opera/)

  if (parseInt(picture)>=number) picture=0;
  if (parseInt(picture)<0) picture=number-1;
  picturenow=picture;
  var cx=430;
  var cy=150;

  if (ie || ie5)
  {
    document.getElementById('picture_layer').style.filter="blendTrans(duration=1)";
    document.getElementById('picture_layer').filters.blendTrans.Apply();

  }
 // hideform(0);
  document.getElementById('galleryid').style.visibility='visible';
  document.getElementById('picture_layer').src=picture_array[picture];
  document.getElementById('picturenow').innerHTML=String(parseInt(picture)+1);
  document.getElementById('picture_string').innerHTML=picturestring_array[picture];

  if (ie || ie5)
  {
    document.getElementById('picture_layer').filters.blendTrans.Play();
  }

  var picturenew=parseInt(picture)+1;
  timerID = setTimeout("start_slides('"+picturenew+"')",1000*document.getElementById('slides_speed').value);
}
function stop_slides()
{
  clearTimeout(timerID);
  timerID  = 0;
}


