function getDOMObject(n, d){
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=getDOMObject(n,d.layers[i].document); return x;
}


function getCurrentDate(){

	dayName = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",  "Friday",  "Saturday" ) 
	monthName=new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ) 

	var now=new Date(); 
	var date=now.getDate(); 
	var year=now.getYear(); 
	if (year < 2000) 
	   year = year + 1900; 
	return dayName[now.getDay()] + ", " + monthName[now.getMonth()] + " " + date + ", " + year + " "; 
}              
 
function editDynamicContent(id){
	szFeatures = 'width=600,height=470,left=200,top=200,screenX=200,screenY=200,status=no,menubar=no,resizable=no,toolbar=no,scrollbars=no';
	myWindow = window.open('site_content.php?SessionID=' + szSessionID + '&id=' + id, 'winHTMLUpdate', szFeatures);
	myWindow.focus();
}

function showNews(id){
	window.location.href ='news_detail.php?SessionID=' + szSessionID + '&id=' + id;
}

function showEvent(id, date){
	szFeatures = 'width=600,height=470,left=200,top=200,screenX=200,screenY=200,status=no,menubar=no,resizable=no,toolbar=no,scrollbars=yes';
	myWindow = window.open('event_detail.php?SessionID=' + szSessionID + '&id=' + id + '&date=' + date, 'winHTMLUpdate', szFeatures);
	myWindow.focus();
}

function editNews(id){
	szParams = '&id=' + id;
	szFeatures = 'width=600,height=470,left=200,top=200,screenX=200,screenY=200,status=no,menubar=no,resizable=no,toolbar=no,scrollbars=no';
	myWindow = window.open('news_update.php?SessionID=' + szSessionID + szParams, 'winHTMLUpdate', szFeatures);
	myWindow.focus();
}

function editEvent(id, date){
	szParams = '&id=' + id  + '&date=' + date;
	szFeatures = 'width=650,height=500,left=200,top=200,screenX=200,screenY=200,status=no,menubar=no,resizable=no,toolbar=no,scrollbars=no';
	myWindow = window.open('event_update.php?SessionID=' + szSessionID + szParams, 'winHTMLUpdate', szFeatures);
	myWindow.focus();
}

function editContact(id){
	szParams = '&id=' + id;
	szFeatures = 'width=600,height=470,left=200,top=200,screenX=200,screenY=200,status=no,menubar=no,resizable=no,toolbar=no,scrollbars=no';
	myWindow = window.open('contact_update.php?SessionID=' + szSessionID + szParams, 'winHTMLUpdate', szFeatures);
	myWindow.focus();
}

function viewPoll(pollID, id){
	window.location.href ='poll_detail.php?SessionID=' + szSessionID + '&pollid=' + pollID + '&id=' + id;
}

function editPoll(id){
	szParams = '&id=' + id;
	szFeatures = 'width=650,height=470,left=200,top=200,screenX=200,screenY=200,status=no,menubar=no,resizable=yes,toolbar=no,scrollbars=no';
	myWindow = window.open('poll_update.php?SessionID=' + szSessionID + szParams, 'winHTMLUpdate', szFeatures);
	myWindow.focus();
}

function editQuote(id){
	szParams = '&id=' + id;
	szFeatures = 'width=600,height=270,left=200,top=200,screenX=200,screenY=200,status=no,menubar=no,resizable=no,toolbar=no,scrollbars=no';
	myWindow = window.open('quote_update.php?SessionID=' + szSessionID + szParams, 'winHTMLUpdate', szFeatures);
	myWindow.focus();
}

function editUser(id){

	szParams = '&id=' + id;
	szFeatures = 'width=480,height=470,left=200,top=200,screenX=200,screenY=200,status=no,menubar=no,resizable=no,toolbar=no,scrollbars=no';
	myWindow = window.open('user_update.php?SessionID=' + szSessionID + szParams, 'winHTMLUpdate', szFeatures);
	myWindow.focus();
}
