var xmlHttp


/*********************************CALENDAR SHOW FUNCTION***********************************/
function Show(m,d,y,dt,f)

{ 

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)

{

alert ("Browser does not support HTTP Request")

return

} 


var url="calendar_detail.php"

url=url+"?month="+m

url=url+"&day="+d

url=url+"&year="+y

url=url+"&dept="+dt

url=url+"&form="+f

xmlHttp.onreadystatechange=stateChanged 

xmlHttp.open("GET",url,true)

xmlHttp.send(null)




}
/************************************************************************************************/

/**************************************NEWS ARTICLE SHOW FUNCTION********************************/
function News(a)

{ 

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)

{

alert ("Browser does not support HTTP Request")

return

} 


var url="news_detail.php"

url=url+"?article="+a


xmlHttp.onreadystatechange=stateChanged_news

xmlHttp.open("GET",url,true)

xmlHttp.send(null)




}
/****************************************************************************************************/


/**************************************Business Spotlight SHOW FUNCTION********************************/
function Business(a)

{ 

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)

{

alert ("Browser does not support HTTP Request")

return

} 


var url="business_detail.php"

url=url+"?article="+a


xmlHttp.onreadystatechange=stateChanged_spotlight

xmlHttp.open("GET",url,true)

xmlHttp.send(null)




}
/****************************************************************************************************/

/**************************************RFS********************************/
function RFS(a)

{ 

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)

{

alert ("Browser does not support HTTP Request")

return

} 


var url="rfs_form.php"

url=url+"?divison="+a


xmlHttp.onreadystatechange=stateChanged_rfs

xmlHttp.open("GET",url,true)

xmlHttp.send(null)




}
/****************************************************************************************************/

/**************************************interested********************************/
function inter(stockno)

{ 

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)

{

alert ("Browser does not support HTTP Request")

return

} 


var url="inter_form.php"

url=url+"?stockno="+stockno


xmlHttp.onreadystatechange=stateChanged_inter()

xmlHttp.open("GET",url,true)

xmlHttp.send(null)




}
/****************************************************************************************************/

/*************************Function for Contact Verification*****************************************/

function validate(fid,fvalue)

{ 

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)

{

alert ("Browser does not support HTTP Request")

return

} 

var url="validate.php"
url=url+"?fid="+fid
url=url+"&fvalue="+fvalue

if (fid=="name")
{
xmlHttp.onreadystatechange=stateChanged_validatename
}
else if(fid=="address")
{
xmlHttp.onreadystatechange=stateChanged_validateaddress
}
else if(fid=="email")
{
xmlHttp.onreadystatechange=stateChanged_validateemail
}
else if(fid=="name1")
{
xmlHttp.onreadystatechange=stateChanged_validatename1
}

else if(fid=="name2")
{
xmlHttp.onreadystatechange=stateChanged_validatename2
}

else if(fid=="sponsor")
{
xmlHttp.onreadystatechange=stateChanged_validatesponsor
}

else if(fid=="event")
{
xmlHttp.onreadystatechange=stateChanged_validateevent
}

else if(fid=="password")
{
xmlHttp.onreadystatechange=stateChanged_validatepassword
}

else if(fid=="time")
{
xmlHttp.onreadystatechange=stateChanged_validatetime
}

else if(fid=="time2")
{
xmlHttp.onreadystatechange=stateChanged_validatetime2
}

else if(fid=="place")
{
xmlHttp.onreadystatechange=stateChanged_validateplace
}

else if(fid=="date1")
{
xmlHttp.onreadystatechange=stateChanged_validatedate1
}

else if(fid=="date2")
{
xmlHttp.onreadystatechange=stateChanged_validatedate2
}

else if(fid=="announcement")
{
xmlHttp.onreadystatechange=stateChanged_validateannouncement
}

else if(fid=="phone")
{
xmlHttp.onreadystatechange=stateChanged_validatephone
}

else if(fid=="phone1")
{
xmlHttp.onreadystatechange=stateChanged_validatephone1
}
else if(fid=="submittedby")
{
xmlHttp.onreadystatechange=stateChanged_validatesubmittedby
}

xmlHttp.open("GET",url,true)

xmlHttp.send(null)




}
/******************************************************************************************************

/********************************STATE CHANGE FOR CALENDARS*****************************************************************************************************************************/
function stateChanged() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById("moreinfo").innerHTML=xmlHttp.responseText 

} 

}
/*************************************************************************************************************************************************************************************



 

/***********************************STATE CHANGE FOR NEWS***************************************************************************************************************************/
function stateChanged_news() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById("details").innerHTML=xmlHttp.responseText
document.getElementById("news_link").innerHTML='<a href="http://www.union-township.oh.us/index.php?id=admin&section=news" style="text-decoration: none">Back to News Articles</a>'

} 

} 
/*********************************************************************************************************************************************************************************/


/***********************************STATE CHANGE FOR SPOTLIGHT***************************************************************************************************************************/
function stateChanged_spotlight() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById("details").innerHTML=xmlHttp.responseText
document.getElementById("news_link").innerHTML='<a href="http://www.union-township.oh.us/index.php?id=admin&section=spotlight" style="text-decoration: none">Back to Business Spotlight</a>'

} 

} 
/*********************************************************************************************************************************************************************************/

/***********************************STATE CHANGE FOR VALIDATE NAME***************************************************************************************************************************/

function stateChanged_validatename() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('name1').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/***********************************STATE CHANGE FOR VALIDATE ADDRESS***************************************************************************************************************************/

function stateChanged_validateaddress() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('address1').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/***********************************STATE CHANGE FOR interested***************************************************************************************************************************/

function stateChanged_inter() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('U1231E').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************


/***********************************STATE CHANGE FOR VALIDATE EMAIL***************************************************************************************************************************/

function stateChanged_validateemail() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('email1').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/***********************************STATE CHANGE FOR VALIDATE name1***************************************************************************************************************************/

function stateChanged_validatename1() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('name11').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/***********************************STATE CHANGE FOR VALIDATE name2***************************************************************************************************************************/

function stateChanged_validatename2() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('name21').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/***********************************STATE CHANGE FOR VALIDATE sponsor***************************************************************************************************************************/

function stateChanged_validatesponsor() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('sponsor1').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/***********************************STATE CHANGE FOR VALIDATE event***************************************************************************************************************************/

function stateChanged_validateevent() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('event1').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/***********************************STATE CHANGE FOR VALIDATE date***************************************************************************************************************************/

function stateChanged_validatepassword() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('password1').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/***********************************STATE CHANGE FOR VALIDATE time***************************************************************************************************************************/

function stateChanged_validatetime() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('time1').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/***********************************STATE CHANGE FOR VALIDATE time2***************************************************************************************************************************/

function stateChanged_validatetime2() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('time21').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/***********************************STATE CHANGE FOR VALIDATE place***************************************************************************************************************************/

function stateChanged_validateplace() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('place1').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/***********************************STATE CHANGE FOR VALIDATE date1***************************************************************************************************************************/

function stateChanged_validatedate1() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('date11').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/***********************************STATE CHANGE FOR VALIDATE date2***************************************************************************************************************************/

function stateChanged_validatedate2() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('date21').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/***********************************STATE CHANGE FOR VALIDATE announcement***************************************************************************************************************************/

function stateChanged_validateannouncement() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('announcement1').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/***********************************STATE CHANGE FOR VALIDATE phone***************************************************************************************************************************/

function stateChanged_validatephone() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('phone1').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/***********************************STATE CHANGE FOR VALIDATE phone1***************************************************************************************************************************/

function stateChanged_validatephone1() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('phone11').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/***********************************STATE CHANGE FOR VALIDATE submittedby***************************************************************************************************************************/

function stateChanged_validatesubmittedby() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('name1').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/***********************************STATE CHANGE FOR RFS***************************************************************************************************************************/

function stateChanged_rfs() 

{ 

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

{ 

document.getElementById('rfs').innerHTML=xmlHttp.responseText

} 

} 
/********************************************************************************************************************************************************************************************

/*******************************************SHARED FUNCTION***********************/
function GetXmlHttpObject()

{ 

var objXMLHttp=null

if (window.XMLHttpRequest)

{

objXMLHttp=new XMLHttpRequest()

}

else if (window.ActiveXObject)

{

objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")

}

return objXMLHttp

}
/**************************************************************************/