var wheight=100
var wsize=100
var x=5
function openwindow(loca)
{
 temploc=loca
 //alert(loca);
 if (!(window.resizeTo&&document.all)&&!(window.resizeTo&&document.getElementById))
 {
   window.open(loca)
   return
 }
 win2=window.open("","","toolbars")
 win2.moveTo(win2.screen.availWidth/2-50,win2.screen.availHeight/2-50)

 //win2.moveTo(90,4)
 win2.resizeTo(1,1)
 animateWin()
}

function ShowBasicImg(BasicPhotoName)
{	
	
	temploc='\\RealEstate\\ShowDeco.asp?img=1&Name='+ BasicPhotoName
	if (!(window.resizeTo&&document.all)&&!(window.resizeTo&&document.getElementById))
	{
		window.open('\\RealEstate\\ShowDeco.asp?img=1&Name=' + BasicPhotoName)
	  	return
	}
	win2=window.open("","","toolbars")	
	win2.moveTo(win2.screen.availWidth/2-50,win2.screen.availHeight/2-50)
	win2.resizeTo(1,1)
	animateWin()
}

function showimg(imgid)
{	
	temploc='\\realestate\\showreimg.asp?imgid='+imgid
	if (!(window.resizeTo&&document.all)&&!(window.resizeTo&&document.getElementById))
	{
		window.open('\\RealEstate\\ShowREImg.asp?ImgId='+imgid)
	  	return
	}
	win2=window.open("","","scrollbars=yes,toolbars")
	win2.moveTo(win2.screen.availWidth/2-50,win2.screen.availHeight/2-50)
	win2.resizeTo(1,1)
	animateWin()
}

function animateWin()
{
   if (wheight+10>=screen.availHeight)
       x=0
   wheight+=4
   wsize+=4
   win2.moveBy(-2,-2)
   win2.resizeBy(4,4)
   if (wsize>=600)
   {
       win2.location=temploc
       wheight=100
       wsize=100
       x=1
       return
   }   
   setTimeout("animateWin()",20)
}

function SetStatus()
{
	setTimeout('window.defaultStatus ="SurajInfo.com"',10);
}

function CallPhotogal(PId,Imgtype,CatId,propertyid,bldid)
{
	var mwidth=500;
	var mheight=308;
	window.open('/realestate/REPhotogal.asp?ProjectId='+ PId + '&img='+Imgtype +'&CatId='+CatId +'&propid='+propertyid+'&bldid='+bldid,'winPhoto','toolbar=no,titlebar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,fullscreen=no,scrollbars=0,top=150,left=190,width='+(mwidth-6)+',height='+(mheight-26));
}	
