var windowProperties = ',toolbar=0,menubar=0,scrollbars=0,status=0,resizable=0';

function openGallery(path,filename,extension,title) {

var img = new Image();
img.src = path+'/'+filename+"."+extension;

mywidth = 640;
myheight = 480;

window.open('/windows/gallery.html?file='+path+'/'+filename+"."+extension+'&title='+title+'','gallery','width='+mywidth+',height='+myheight+windowProperties);

}

function openCallback() {
window.open('/windows/callback.html','callback','width=270, height=440, '+windowProperties);
}

function openInfoRequest() {
window.open('/windows/info-request.html','infoRequest','width=350, height=600, '+windowProperties);
}

function calculator(type,cost,base,floorage,price,company,property) {
	var calculator = null;
	var width;
	var height;
	if(type=='m') {
		width = 280;
		height = 150;
	} else if(type=='p') {
		width = 400;
		height = 500;	
	}
	
	var left = parseInt((screen.availWidth/2) - (width/2))+200;
    var top = parseInt((screen.availHeight/2) - (height/2));
calculator = window.open('/windows/calculator.html?type='+type+'&cost='+cost+'&base='+base+'&floorage='+floorage+'&price='+price+'&company='+company+'&prop='+property,type,'width='+width+',height='+height+',top='+top+',left='+left+windowProperties);
	calculator.focus();
}
