// JavaScript Document
function set_image(imageId)
{
	
	if(thumbImageArray[imageId])
	{
	document.getElementById("bigImage").innerHTML = "<a href='"+thumbImageArray[imageId]+"' target='_blank'> <img src='"+thumbImageArray[imageId]+"' width='360' height='240'  border='0' class='box'/></a>" ;

    document.getElementById("heading_img").innerHTML = headingArray[imageId];
	//"+imageDimenstion[imageId]+"
	}
}
/*
function GotoNext()
{
	if(thumbImageArray[imageCounter] && imageCounter < 9)
	{
		imageCounter++ ;
  document.getElementById("bigImage").innerHTML = "<a href='"+thumbImageArray[imageCounter]+"' target='_blank'> <img src='"+thumbImageArray[imageCounter]+"' align='texttop' border='0'  style='border-color: rgb(119, 119, 119); border:solid 3px  #FFD5AA;' width='200' height='200'/></a>" ;
    
	
	document.getElementById("heading_img").innerHTML = headingArray[imageCounter];
	}
	
}

function GotoPrevious()
{
	if(thumbImageArray[imageCounter] && imageCounter > 0)
	{
		  imageCounter--;
  document.getElementById("bigImage").innerHTML = "<a href='"+thumbImageArray[imageCounter]+"' target='_blank'> <img src='"+thumbImageArray[imageCounter]+"' align='texttop' border='0'  style='border-color: rgb(119, 119, 119); border:solid 3px  #FFD5AA;' width='200' height='200'/></a>" ;

	document.getElementById("heading_img").innerHTML = headingArray[imageCounter];


	}
}

function get_large_image(id)
 {
	alert("comes here"); 
    document.getElementById("large_image").innerHTML = "<a href=\"uploaded/"+images[id]+"\" target=\"_blank\"><img src='big_thumbnails/"+images[id]+"' border='0'></a>" ;
    //alert(id);
 }*/
 
 function popup(file,Iwidth,Iheight){
	var strPageName
	var h = Iheight;
	var w = Iwidth;
	var winl = (screen.width - w) / 2;
	var wint =(screen.height - h) / 2;
	window.open(file,"MailListing","width="+w+",height="+h+",top="+wint+",left="+winl+"scrollbars=1,resizable,statusbar=no");
}
function popup_map(file,name)
{
	var strPageName;
	var h = 500;
	var w = 500;
	
	var winl = (screen.width - w) / 2;
	var wint =(screen.height - h) / 2;
	var lat = "<?=$latitude?>" ;
	var add = "<?=$address?>";
	var long1 = "<?=$longitute?>";
	var new_url = file +"?lat="+lat+"&long1="+long1+"&head="+name+"&add="+add;
	window.open(new_url);
}


function callme()
{
	var txtnm = document.add_list_step2.txtnm.value;
	if(txtnm=="")
	{
	  alert("Please enter name.");
	  document.add_list_step2.txtnm.focus();
	  return false;
	} 
	if(txtnm.search(/^[a-zA-Z]/))
	{
	  alert("Please enter valid name.");
	  document.add_list_step2.txtnm.focus();
	  document.add_list_step2.txtnm.select();
	  return false;
	}
	var txt_mail = document.add_list_step2.emails.value;
	if(txt_mail == "")
	{
		alert("Please enter email-Id.");
		document.add_list_step2.emails.focus();
		return false;
	}
	if(txt_mail.search(/^[A-Za-z]+\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1 )
	{
	  		alert("Please enter valid E-mail Id.");
			document.add_list_step2.emails.focus();
	  		return false;
	}

	var txtsub = document.add_list_step2.subject.value;
	if(txtsub=="")
	{
	  alert("Please enter valid Subject.");
	  document.add_list_step2.subject.focus();
	  return false;
	} 

	var txtmsg = document.add_list_step2.message.value;
	if(txtmsg=="")
	{
	  alert("Please enter valid Message.");
	  document.add_list_step2.message.focus();
	  return false;
	} 

 
  // window.add_list_step2.action = "list_description.php?list_id=<?= $listings_id; ?>&flg=1&member_id=<?= $member_id; ?>";



   window.add_list_step2.submit();
  
}

function addbookmark()
{
bookmarkurl="http://www.guerseygroup.com"
bookmarktitle="Welcome To Guersey Group"
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}