function addBookmarkWin(type, id) {
	var url = "propBookmark.do?action=addBookmark&type=" + type + "&key=" + id;
	var bookmarkWin = window.open(url,'bookmarkWin',getBookmarkWinFeatures());
	bookmarkWin.opener = window;
	bookmarkWin.focus();
}
function addBookmarkUtil() {
	if (window.sidebar) { // Mozilla Firefox Bookmark		
		window.sidebar.addPanel(window.document.title, document.location.href, "");	
	} else if( window.external ) { // IE Favorite		
		window.external.AddFavorite( document.location.href, window.document.title); 
	} else if(window.opera && window.print) { // Opera Hotlist
		//return true; 
	}
}
function sendRefer(type, id) {
	var url = "propRefer.do?action=referPage&type=" + type + "&key=" + id;
	var referWin = window.open(url,'referWin',getReferWinFeatures());
	referWin.opener = window;
	referWin.focus();
}
function postReview(type, id) {
	var url = "propReview.do?action=listReviews&reviewType=" + type;
	if ( type == 1 )
		url = url + "&userId=" + id;
	else if ( type == 2 )
		url = url + "&projectId=" + id;
	else if ( type == 3 )
		url = url + "&propertyId=" + id;
	var reviewWin = window.open(url,'reviewWin',getReviewWinFeatures());
	reviewWin.opener = window;
	reviewWin.focus();
}
function getBookmarkWinFeatures() {
	var width=600;
	var height=250;
	var left = (window.screen.width) - ((width) + 15);
	var top = (window.screen.height) - ((height) + 90);
	var features = "status=yes,help=no,resizable=no,scrollbars=yes,menubar=no,"
	features = features + "width=" + width + ",height=" + height + ",left=" + left + ",top=" + top + "";
	return features;
}
function getReferWinFeatures() {
	var width=600;
	var height=300;
	var left = (window.screen.width) - ((width) + 15);
	var top = (window.screen.height) - ((height) + 90);
	var features = "status=yes,help=no,resizable=no,scrollbars=yes,menubar=no,"
	features = features + "width=" + width + ",height=" + height + ",left=" + left + ",top=" + top + "";
	return features;
}
function getReviewWinFeatures() {
	var width=700;
	var height=500;
	var left = (window.screen.width) - ((width) + 15);
	var top = (window.screen.height) - ((height) + 90);
	var features = "status=yes,help=no,resizable=no,scrollbars=yes,menubar=no,"
	features = features + "width=" + width + ",height=" + height + ",left=" + left + ",top=" + top + "";
	return features;
}
function postEnq(form) {
	if ( validatePropEnquiryForm(form) ) {
		var status = true;
		var message = new Array();
		var messageCount = 0;
		var field = null;
		if ( trim(form.senderLandline.value) == "" && trim(form.senderMobile.value) == "" ) {
			message[messageCount++] = postEnqPhReq;
			if ( field == null ) field = form.senderLandline;
		}
		if ( messageCount > 0 )	{
			showAlert(message); 
			field.focus(); status = false; return false;
		}
		if ( status == true ) {
			replaceSpecialChars(form.senderName, form.senderCity, form.senderLandline, form.senderMobile, form.senderEmail, form.senderRequest);
			form.submit();
		}
	}
}
function startTrap() {
	if ( navigator.appName == "Microsoft Internet Explorer" )
		document.getElementById('trap_progress').click();
}
function trapProgressBar() {
}
