﻿function openKatabatForm(intFormId) {
	var initialX = 100;
	var initialY = 100;
	var theLink = "http://quickcapture.mosthomes.com/qc.aspx?sourceId=130&formId=" + intFormId.toString();

	if (navigator.appName == "Netscape") {
		theWindow = open( theLink, "Lookup", "width=500,height=560," +
				"screenX=" + initialX + ",screenY=" + initialY +
				",scrollbars,resizable");
		theLink.focus(); // make sure our new window is in front
	} else {
		theWindow = open( theLink, "Lookup", "width=500,height=560" +
			",left=" + initialX + ",top=" + initialY +
			",scrollbars,resizable");
	}
	theWindow.opener = self;
}

function requestShowing(MLSNum, sAddress, sCity, iPrice, FirmCode, sEmail, sListingOffice, sListingAgent) {
	var initialX = 100;
	var initialY = 100;
	var theLink = '';
	
	if(sEmail == "")
	  sEmail = "TBD@Griffin.com";
	  
	var fid = "";  //Form Id to use
	var extra = "";  //some forms need extra params put them in here
	if(FirmCode == '2311' || FirmCode == '17730' || FirmCode == '75116' || FirmCode == '13380') 
	{
	  fid = "1658";
	  extra = "&routeto=" + escape(sEmail) + "&155=" + escape(sEmail) + "&154=" + escape(sListingAgent) + "&ign='Y'";
	}
	else
	{
	  fid = "1659";
	}
		
	theLink = "http://quickcapture.mosthomes.com/qc.aspx?sourceId=130&formId=" + fid + "&81=" + escape(sAddress) + "&82=" + escape(sCity)  + 
	    "&87=" + escape(MLSNum) + "&505=" + escape(iPrice) + "&236=" + escape(sListingOffice) + "&238=" + escape(sListingAgent) + extra ;
	
	//if(FirmCode == '2311' || FirmCode == '17730' || FirmCode == '75116' || FirmCode == '13380') {
	//    theLink = "http://quickcapture.mosthomes.com/qc.aspx?sourceId=130&formId=1658&81=" + escape(sAddress) + "&82=" + escape(sCity) + "&routeto=" + escape(sEmail) + "&155=" + escape(sEmail);
	//} else {
	//    theLink = "http://quickcapture.mosthomes.com/qc.aspx?sourceId=130&formId=1659&81=" + escape(sAddress) + "&82=" + escape(sCity);
	//}
	//theLink = theLink + '&87=' + escape(MLSNum) + '&505=' + escape(iPrice);

	if (navigator.appName == "Netscape") {
		theWindow = open( theLink, "Lookup", "width=500,height=560," +
				"screenX=" + initialX + ",screenY=" + initialY +
				",scrollbars,resizable");
		theLink.focus(); // make sure our new window is in front
	} else {
		theWindow = open( theLink, "Lookup", "width=500,height=560" +
			",left=" + initialX + ",top=" + initialY +
			",scrollbars,resizable");
	}
	theWindow.opener = self;
}

function moreInfo(MLSNum, sAddress, sCity, iPrice, FirmCode, sEmail, sListingOffice, sListingAgent) {
		var initialX = 100;
		var initialY = 100;
		var theLink = '';
		
			if(sEmail == "")
	    sEmail = "TBD@Griffin.com";
  	  
	  var fid = "";  //Form Id to use
	  var extra = "";  //some forms need extra params put them in here
	  if(FirmCode == '2311' || FirmCode == '17730' || FirmCode == '75116' || FirmCode == '13380') 
	  {
	    fid = "1662";
	    extra = "&routeto=" + escape(sEmail) + "&155=" + escape(sEmail) + "&154=" + escape(sListingAgent) + "&ign='Y'";
	  }
	  else
	  {
	    fid = "1663";
	  }
  		
	  theLink = "http://quickcapture.mosthomes.com/qc.aspx?sourceId=130&formId=" + fid + "&81=" + escape(sAddress) + "&82=" + escape(sCity)  + 
	      "&87=" + escape(MLSNum) + "&505=" + escape(iPrice) + "&236=" + escape(sListingOffice) + "&238=" + escape(sListingAgent)  + extra;
	    
	    
    	//theLink = "http://quickcapture.mosthomes.com/qc.aspx?sourceId=130&formId=1663&81=" + escape(sAddress) + "&82=" + escape(sCity) + '&87=' + escape(MLSNum);

		if (navigator.appName == "Netscape") {
			theWindow = open( theLink, "Lookup", "width=500,height=560," +
					"screenX=" + initialX + ",screenY=" + initialY +
					",scrollbars,resizable");
			theLink.focus(); // make sure our new window is in front
		} else {
			theWindow = open( theLink, "Lookup", "width=500,height=560" +
				",left=" + initialX + ",top=" + initialY +
				",scrollbars,resizable");
		}
		theWindow.opener = self;
}