﻿//** 10/19/07 - SDW - Added following statement
var TMSrvrNm = 'www.SentryDynamics.net' //** Also change in App_Code/SiteData.vb, Default_Misc.js and dataentry/CustomerService_Remote.js

var popUp; 

function OpenCalendar(idname, postBack){
  //** 10/19/07 - SDW - Replaced following 
  //popUp = window.open('http://sentrydynamics.net/titlem/Calendar.aspx?formname=' + document.forms[0].name + 
	//	  '&id=' + idname + '&selected=' + document.forms[0].elements[idname].value + '&postBack=' + postBack, 
	//	  'popupcal', 
	//	  'width=165,height=208,left=200,top=250');
  popUp = window.open('http://' + TMSrvrNm + '/titlem/Calendar.aspx?formname=' + document.forms[0].name + 
		  '&id=' + idname + '&selected=' + document.forms[0].elements[idname].value + '&postBack=' + postBack, 
		  'popupcal', 
		  'width=165,height=208,left=200,top=250');
}

function SetDate(formName, id, newDate, postBack)
{
	eval('var theform = document.' + formName + ';');
	popUp.close();
	theform.elements[id].value = newDate;
	if (postBack)
		__doPostBack(id,'');
}		
function openDetailWin(CustID,theMonth){
  //window.open('http://www.sentrydynamics.net/titlem/reports/csr_acct_bill_detail.aspx?cid='+CustID+'&mo='+theMonth,'detail_window','left=100,top=100,width=700,height=500,toolbar=1,resizable=1');
  //** 10/19/07 - SDW - Replaced following 
  //** window.open('http://www.sentrydynamics.net/titlem/reports/csr_acct_bill_detail.aspx?cid='+CustID+'&mo='+theMonth,'detail_window','left=100,top=100,width=700,height=500,toolbar=1,resizable=1');
  window.open('http://' + TMSrvrNm + '/titlem/reports/csr_acct_bill_detail.aspx?cid='+CustID+'&mo='+theMonth,'detail_window','left=100,top=100,width=700,height=500,toolbar=1,resizable=1');

}

function loadInvoice(evtID){
  // window.open('http://www.sentrydynamics.net/titlem/reports/event_invoice.aspx?evtid=' + evtID,'invoicepage','');
  //** 10/19/07 - SDW - Replaced following 
  //window.open('http://www.sentrydynamics.net/titlem/reports/event_invoice.aspx?evtid=' + evtID,'invoicepage','');
  window.open('http://' + TMSrvrNm + '/titlem/reports/event_invoice.aspx?evtid=' + evtID,'invoicepage','');
  return
}
    
function OpenHelp(idname){
  //** 10/19/07 - SDW - Replaced following 
  //popUp = window.open('http://sentrydynamics.net/titlem/help.aspx?content=' + idname,'popuphelp', 
	//	'width=400,height=600,left=200,top=250');
  popUp = window.open('http://' + TMSrvrNm + '/titlem/help.aspx?content=' + idname,'popuphelp', 
		'width=400,height=600,left=200,top=250');
}