
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings =
	'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'//,resizable
	win = window.open(mypage,myname,settings)
	}

/* ----------------------------------------------------------- */
function DeleteList (EmailList, ListID) {
	var DeleteListLink = "/admin/alert_admin/lists.cfm?DeleteListID=" + ListID;
	var ConfirmMessage = "Are you sure that you want to delete the following mailing list: " + EmailList +"\n\nCAUTION - This action can not be undone."
	var agree=confirm (ConfirmMessage);
	if (agree)
		window.location = DeleteListLink;
	}
/* ----------------------------------------------------------- */
	function DeleteUser (UserID) {
	var DeleteUserLink = "/admin/alert_admin/delete_subscriber.cfm?DeleteID=" + UserID;
	var ConfirmMessage = "Are you sure that you want to delete the following User: " + UserID +"\n\nCAUTION - This action can not be undone."
	var agree=confirm (ConfirmMessage);
	if (agree)
		window.location = DeleteUserLink;
	}
/* ----------------------------------------------------------- */	
	function DeleteAll () {
	var DeleteAllLink = "/admin/alert_admin/delete_subscriber.cfm?delete_all=yes";
	var ConfirmMessage = "Are you sure that you want to delete all of the users from the system? \n\nCAUTION - This action can not be undone."
	var agree=confirm (ConfirmMessage);
	if (agree)
		window.location = DeleteAllLink;
	}

/* ----------------------------------------------------------- */
	function DeleteEvent (eventID) {
	var DeleteEventLink = "/admin/calendar_admin/editCalendarEvent.cfm?action=delete&eventID=" + eventID;
	var ConfirmMessage = "Are you sure that you want to delete this event? \n\nCAUTION - This action can not be undone."
	var agree=confirm (ConfirmMessage);
	if (agree)
		window.location = DeleteEventLink;
	//else
		//window.location = "/admin/calendar_admin/eventList.cfm"; 
	}
/* ----------------------------------------------------------- */

function DeleteNews (newsID) {
	var DeleteNewsLink = "/admin/news_admin/editnews.cfm?action=delete&newsID=" + newsID;
	var ConfirmMessage = "Are you sure that you want to delete this news headline? \n\nCAUTION - This action can not be undone."
	var agree=confirm (ConfirmMessage);
	if (agree)
		window.location = DeleteNewsLink;
	//else
		//window.location = "/admin/calendar_admin/eventList.cfm"; 
	}
/* ----------------------------------------------------------- */

function DeleteFaq (faqID) {
	var DeleteFaqsLink = "/admin/faq_admin/editFaq.cfm?action=delete&faqID=" + faqID;
	var ConfirmMessage = "Are you sure that you want to delete this FAQ? \n\nCAUTION - This action can not be undone."
	var agree=confirm (ConfirmMessage);
	if (agree)
		window.location = DeleteFaqsLink;
	//else
		//window.location = "/admin/calendar_admin/eventList.cfm"; 
	}
/* ----------------------------------------------------------- */

function DeleteWebPage (contentID) {
	var DeleteWebPageLink = "/admin/content_admin/deletePage.cfm?action=delete&contentID=" + contentID;
	var ConfirmMessage = "Are you sure that you want to delete this web page? \n\nCAUTION - This action can not be undone."
	var agree=confirm (ConfirmMessage);
	if (agree)
		window.location = DeleteWebPageLink;
	//else
		//window.location = "/admin/calendar_admin/eventList.cfm"; 
	}
/* ----------------------------------------------------------- */

function viewday (yr,mm,dd) {
	window.open('day.cfm?&year=' +yr+ '&month=' +mm+ '&day=' +dd,'VIEWDAY','scrollbars,resizable,height=400,width=400');
	}
function viewdaytanning (yr,mm,dd) {
	window.open('day1.cfm?&year=' +yr+ '&month=' +mm+ '&day=' +dd,'VIEWDAY','scrollbars,resizable,height=350,width=875');
	}
function drawAlert () {
alert ("Please set the layout of your printer to 'landscape' mode in order to print this calendar properly.  Also, please set all of the margins of this document to 0.5in.  These changes can be made in the 'Page Setup' dialogue box of your browser.");
}

/* ----------------------------------------------------------- */
/*	function validate(){
	var invalid = "\""; // Invalid character is a "
	if (document.UpdateName.UpdateListName.value.indexOf(invalid) > -1) {
	alert("Sorry, quotation marks are not allowed.");
	return false;
	}
	else {
	return true;
	   }
	}*/
/* ----------------------------------------------------------- */
/*	function validate2(){
	var invalid = "\""; // Invalid character is a "
	if (document.NewName.NewListName.value.indexOf(invalid) > -1) {
	alert("Sorry, quotation marks are not allowed.");
	return false;
	}
	else {
	return true;
	   }
	}*/


/* ----- Year for Copyright ------------------------ */
function copyright_year() {
document.write("2009 ");
}



/* ----------------------------------------------------------- */
function break_out_of_frames() {
	if (parent.frames.length > 0) {parent.location.href = self.document.location;}
}



/* ----------------------------------------------------------- */
function PageLastUpdated() {
	if (document.lastModified){	document.write("Page Last Updated: " + document.lastModified);}
}



/* ----------------------------------------------------------- 
function informedquicklinks() {
d=document
d.write ("<option value='cconsent.cfm' SELECTED>Quick Links for Informed Consent ......</option>");
d.write ("<option value='../files/consent_checklist.pdf'>Consent Checklist</option>");
d.write ("<option value='../files/consent_template.doc'>Consent Template</option>");
d.write ("<option value='../files/sample_consent_adult.doc'>Consent Sample for 18 yrs & Older</option>");
d.write ("<option value='../files/sample_assent_minors.doc'>Assent for Minors</option>");
d.write ("<option value='../files/OnLineConsentSample.doc'>On-Line Consent Sample</option>");
d.write ("<option value='../files/ConsentProcedureWaiver.dot'>Waiver or Alteration of Consent Procedure</option>");
d.write ("<option value='../files/ConsentdocWaiver.dot'>Waiver of Consent Documentation</option>");
}
*/
/* ----------------------------------------------------------- 
function painquicklinks() {
d=document
d.write ("<option value='paindistress.cfm' SELECTED>Quick Links for Pain Classifications </option>");
d.write ("<option value='../files/CatE702.doc'>Category E Supplemental Form</option>");
d.write ("<option value='../files/CatEsigns.doc'>Signs of Pain and Distress</option>");
}
*/

/* ----------------------------------------------------------- */
function OpenWindow(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=yes,width=600,height=300,left = 100,top = 100');");
}



/* ----------------------------------------------------------- */
function closewindow(){
//alert
oWindow = window.parent.close(); 
}



/* ----------------------------------------------------------- */
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}



/* ----------------------------------------------------------- */
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}



/* ----------------------------------------------------------- */
function MM_findObj(n, d) { //v3.0
  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=MM_findObj(n,d.layers[i].document); return x;
}



/* ----------------------------------------------------------- */
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



/* ----------------------------------------------------------- */
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}

/* ----------------------------------------------------------- */


//END
