function DisplayUploadPage(imagetype)
{
//User: WSDocumentEdit.asp 
//      WSVideoEdit.asp
	var link = "WSFileUpload.asp" + "?type=" + imagetype + "&Header=No";
	linkpopup = window.open((link),"Upload","width=450,height=275,scrollbars=0,resizable=1,left=50,top=50");
	
}
function DisplayImageUploadPage(imagetype)
{
//User: WSImageEdit.asp 
	var link = "WSFileImageUpload.asp" + "?type=" + imagetype + "&Header=No";
	linkpopup = window.open((link),"Upload","width=450,height=275,scrollbars=0,resizable=1,left=50,top=50");
	
}

function DisplayMemorialUploadPage(imagetype)
{
//User: WSMemorialEdit.asp 
	var link = "WSUploadMemorialPicture.asp" + "?type=" + imagetype + "&Header=No";
	linkpopup = window.open((link),"Upload","width=450,height=275,scrollbars=0,resizable=1,left=50,top=50");
	
}
function openWin2(URL, name) 
{
//User: Searchproduct.asp
  popupWin = window.open(URL, name, 'dependent,scrollbars,width=225,height=375' );
}

 
function openWin3(URL, name) 
{
//User: Searchproduct.asp
  bandpopup = window.open(URL, name, "dependent,scrollbars,width=640,height=400");
}

function openWinFull(URL, name) 
{
//User: Searchproduct.asp
  window.close()
  FullWindow = window.open(URL);
}

function LaunchMenuItem(URL, name,wsWebCenterID) 
{
//Users:	WSAddContent.asp
//			WSWCControl.asp
//			WSAdminLogin.asp
//			WSUserProfileChange.asp
//			classifieds.asp
  var wnd;
  name="Mgmt_" + wsWebCenterID;
  wnd = window.open(URL,name, "dependent,status=yes,resizable=yes,scrollbars,width=700,height=600,Location=yes");
}

function LaunchEdit(URL, value) 
{
//Users:	AdminPanel

  var wnd;
  wnd = window.open(URL, "", "dependent,status=yes,scrollbars,width=800,height=600");
}


function UpdateEditorList() {
//	Used:	WSEditorList.asp (not used)
	var url,cUserED,cGroupED,cGroupRD,cUserRD;
	cUserED=document.choiceform.chkUserED.checked;
	cGroupED=document.choiceform.chkGroupED.checked;
	url="";
	url="WSEditorList.asp?";
	url=url + "chkUserED=" + cUserED;
	url=url + "&chkGroupED=" + cGroupED;
	window.navigate(url);
}



function UpdatePublisherList() {
//User:		WSSectionPublisherList.asp
	var url,cUserED,cGroupED,cGroupRD,cUserRD;
	cUserRD=document.choiceform.chkUserRD.checked;
	cGroupRD=document.choiceform.chkGroupRD.checked;
	url="";
	url="WSPublisherList.asp?";
	url=url + "chkUserRD=" + cUserRD;
	url=url + "&chkGroupRD=" + cGroupRD;
	window.navigate(url);
}


function UpdateReaderList() {
//	User:	WSReaderList.asp
//			WSEditorList.asp
//			WSContainerPublisher.asp
//			WSPublisherList.asp
//	This routine is currently not used.

	var url,cUserED,cGroupED,cGroupRD,cUserRD;
	cUserRD=document.choiceform.chkUserRD.checked;
	cGroupRD=document.choiceform.chkGroupRD.checked;
	url="";
	url="WSReaderList.asp?";
	url=url + "chkUserRD=" + cUserRD;
	url=url + "&chkGroupRD=" + cGroupRD;
	window.navigate(url);
}



function UpdateContentTable() {
//	User:	WSCMTop.asp
	var url,cStory,cLink,cPoll,cEvent,cAd,cLinkList,cMarket,cSurvey,cTrial;
	var cArchive;
	cStory=document.CM.chkStory.checked;
	cLink=document.CM.chkLink.checked;
	cLinkList=document.CM.chkLinkList.checked;
	cPoll=document.CM.chkPoll.checked;
	cEvent=document.CM.chkEvent.checked;
	cTEvent=document.CM.chkTEvent.checked;
//	cAd=document.CM.chkAd.checked;
//	cMarket=document.CM.chkMarket.checked;
	cForum=document.CM.chkForum.checked;
//	cArchive=document.CM.chkArchive.checked;
	cForumList=document.CM.chkForumList.checked;
	cSurvey=document.CM.chkSurvey.checked;
	cTrial=document.CM.chkTrial.checked;
	cDirectory=document.CM.chkDirectory.checked;
	cNewsFeed=document.CM.chkNewsFeed.checked;
	cMemorial=document.CM.chkMemorial.checked;
	cMemorial=document.CM.chkDocument.checked;
	url=""
	url="WSCMTop.asp?chkArchive=" + cArchive + "&chkStory=" + cStory + "&chkLink=" + cLink + "&chkLinkList=" + cLinkList + "&chkAd=" + cAd + "&chkTEvent=" + cTEvent + "&chkEvent=" + cEvent + "&chkPoll=" + cPoll + "&chkMarket=" + cMarket + "&chkForum=" + cForum+ "&chkForumList=" + cForumList + "&chkSurvey=" + cSurvey + "&chkTrial=" + cTrial + "&chkDirectory=" + cDirectory+ "&chkNewsFeed=" + cNewsFeed + "&chkMemorial=" + cMemorial + "&chkDocument=" + cDocument;
	window.navigate(url);
}


function DisplayAssign(llid) {
//Users:	WSCMTop.asp
//			WSForumEdit.asp
//			WSLinkEdit.asp
//			WSLinkListEdit.asp
//			WSMarketStats.asp
//			WSPoll.asp
//			WSStory.asp
	var url
	url="WSAssign.asp?Mode=Assign&ContentID=" + llid;
	popw=window.open(url,"","dependent,location,scrollbars,width=640,height=500,resizable=yes");
}

function DisplaySetup(llid) {
//Users:	WSDirectoryEdit.asp

	var url
	url="WSDirectorySetup.asp?Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,location,scrollbars,width=640,height=500,resizable=yes");
}

function DisplayDirAddField(llid) {
//Users:	WSDirectoryEdit.asp

	var url
	url="WSDirectoryEditField.asp?Mode=Add&ContentID=" + llid;
	popw=window.open(url,"","dependent,location,scrollbars,width=640,height=500,resizable=yes");
}
function DisplayEditItem(llid) {
//Users:	WSDirectoryEditItem.asp

	var url
	url="WSDirectoryEditItem.asp?Mode=Add&ContentID=" + llid;
	popw=window.open(url,"","dependent,location,scrollbars,width=640,height=500,resizable=yes");
}
function DisplayViewItems(llid) {
//Users:	WSDirectoryEditItem.asp

	var url
	url="WSDirectoryViewItems.asp?Mode=View&ContentID=" + llid;
	popw=window.open(url,"","dependent,location,scrollbars,width=640,height=500,resizable=yes");
}
function LaunchCMBySection(llid) {
//Users:	WSWCControl.asp
	var url
	url="WSCMTop.asp?SectionID=" + llid;
	popw=window.open(url,"","dependent,location,scrollbars,width=700,height=500,resizable=yes");
}

function LaunchCMByType(UrlBase,Typeid) {
//Users:	WSWCControl.asp	
	var url;
	if (Typeid==1009) {
		url=UrlBase + "WSImageBrowse.asp?Mode=View"}
	else {
		url=UrlBase + "WSCMTop.asp?ContentTypeID=" + Typeid}
	popw=window.open(url,"","dependent,location,scrollbars,width=700,height=500,resizable=yes");
}


function DisplayEditors(llid,lPid) {
//Users:	WSEventEdit.asp
//			WSForumEdit.asp
//			WSForumListEdit.asp
//			WSImageEdit.asp
//			WSLinkEdit.asp
//			WSLinkListEdit.asp
//			WSPoll.asp
//			WSStory.asp


	var url
	url="WSEditorList.asp?Type=content&Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location=yes,width=500,height=600,resizable=yes");
}


function DisplayReaders(llid,lPid) {
//Users:	WSEventEdit.asp
//			WSForumEdit.asp
//			WSForumListEdit.asp
//			WSImageEdit.asp
//			WSLinkEdit.asp
//			WSLinkListEdit.asp
//			WSPoll.asp
//			WSStory.asp
	var url
	url="WSReaderList.asp?Type=content&Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location=yes,width=500,height=600,resizable=yes");
}


function DisplaySectionEditors(llid) {
//Users:	WSSectionEdit.asp
//			
	var url
	url="../contentmanagement/WSEditorList.asp?Mode=Edit&Type=section&SectionID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location=yes,width=500,height=600,resizable=yes");
}
function DisplaySectionReaders(llid) {
//Users:	WSSectionEdit.asp
//			
	var url
	url="../contentmanagement/WSReaderList.asp?Mode=Edit&Type=section&SectionID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location=yes,width=500,height=600,resizable=yes");
}


function DisplaySectionPublishers(llid) {
//Users:	WSSectionEdit.asp
//			
	var url
	url="WSPublisherList.asp?Mode=Edit&Type=section&SectionID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location=yes,width=500,height=600,resizable=yes");
}

function DisplayPublishers(List) {
//Users:	WSLayoutEdit.asp
//
	var url;
	var atsn
	var selectedItem=List.selectedIndex;
	atsn=List.options[selectedItem].value
	url="WSContainerPublisherList.asp?Mode=Edit&ATSN=" + atsn;
	popw=window.open(url,"","dependent,scrollbars,location=yes,width=500,height=600,resizable=yes");
}



function DispParameters(wid) {
//Users:	WSAsddContent.asp
//			WSWCControl.asp
	var url
	url="../sitemanagement/WSParameterEdit.asp?Mode=Edit&WebCenterID=" + wid;
	popw=window.open(url,"","dependent,scrollbars,width=640,height=500,resizable=yes");
}
function DispLayout(tid) {
//Users:	WSSectionEdit.asp
//
	var url
	if (tid==0) {
		alert("You must first choose a template for this page or section");
	}
	else {		
		url="WSLayoutEdit.asp?SectionID=" + tid;
		popw=window.open(url,"","dependent,location,scrollbars=yes,width=640,height=520,resizable=yes");

		//window.navigate(url);
	}
}

function AddLink(lContentID) {
//Users:	WSAddlink.asp
//			WSLinkListEdit.asp

	var url
	url="WSAddLink.asp?Mode=Add&ContentID=" + lContentID
	popw=window.open(url,"","dependent,scrollbars,location=yes,width=640,height=500");
}


function AddForum(lContentID) {
//Users:	WSAddEventCategory.asp
//			WSForumListEdit.asp
	var url
	url="WSAddForum.asp?Mode=Add&ContentID=" + lContentID
	popw=window.open(url,"","dependent,scrollbars,location=yes,width=640,height=500");
}

function AddEventCategory(lCategoryID) {
//Users:	WSAddEventCategory.asp
//			WSEventListEdit.asp
	var url
	url="WSAddEventCategory.asp?Mode=Add&ContentID=" + lCategoryID
	popw=window.open(url,"","dependent,scrollbars,location=yes,width=640,height=500");
}


function OpenLayoutEdit(sid) {
//Users:	WSAddContent.asp
//			WSWCControl.asp

	var url
	url="../sitemanagement/WSLayoutEdit.asp?SectionID=" + sid;
	popw=window.open(url,"","dependent,scrollbars,width=640,height=540,resizable=yes");
}



function EditLink(llid) {
//Users:	WSCMTop.asp
	var url;
	url="WSLinkEdit.asp?Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=640,height=500,resizable=yes");
}

function DisplayPost(url) {
//Users:	Forum.asp
//			ForumPage.asp

	popw=window.open(url,"","dependent,scrollbars,location,width=640,height=500,resizable=yes");
}

function EditMarketStats(llid) {
//Users:	WSCMTop.asp
	var url;
	url="WSMarketStats.asp?Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=640,height=500,resizable=yes");
}


function EditPoll(llid) {
//Users:	WSCMTop.asp
	var url;
	url="WSPoll.asp?Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=640,height=500,resizable=yes");
}

function EditEventList(llid) {
//Users:	WSCMTop.asp
	var url;
	url="WSEventListEdit.asp?Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=640,height=500,resizable=yes");
}

function EditSurvey(llid) {
//Users:	WSCMgmtHeader.asp
	var url;
	url="WSSurvey.asp?Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=800,height=500,resizable=yes");
}

function EditTrial(llid) {
//Users:	WSCMgmtHeader.asp
	var url;
	url="WSTrial.asp?Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=800,height=500,resizable=yes");
}
function EditDirectory(llid,subtype) {
//Users:	WSCMgmtHeader.asp
	var url;
	url="WSDirectoryEdit.asp?Type=" + subtype + "&Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=800,height=500,resizable=yes");
}
function EditNewsFeed(llid) {
//Users:	WSCMgmtHeader.asp
	var url;
	url="WSNewsFeedEdit.asp?Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=800,height=500,resizable=yes");
}

function EditMemorial(llid) {
//Users:	WSCMgmtHeader.asp
	var url;
	url="WSMemorialEdit.asp?Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=800,height=500,resizable=yes");
}
function EditDocument(llid) {
//Users:	WSCMgmtHeader.asp
	var url;
	url="WSDocumentEdit.asp?Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=800,height=500,resizable=yes");
}

function EditVideo(llid) {
//Users:	WSCMgmtHeader.asp
	var url;
	url="WSVideoEdit.asp?Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=800,height=500,resizable=yes");
}

function EditImage(llid) {
//Users:	WSImageBrowse.asp
	var url;
	url="WSImageEdit.asp?Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=640,height=500,resizable=yes");
}


function AddImage() {
//Users:	WSImageBrowse.asp
	var url;
	url="WSImageEdit.asp?Mode=Add";
	popw=window.open(url,"","dependent,scrollbars,location,width=640,height=500,resizable=yes");
}
function AddDocument() {
//Users:	WSDocumentBrowseNoHeader.asp
	var url;
	url="WSDocumentEdit.asp?Mode=Add";
	popw=window.open(url,"","dependent,scrollbars,location,width=640,height=500,resizable=yes");
}
function BrowseImages(sfield,BaseHref) {
//Users:	WSStory.asp
//			WSParameterEdit.asp
	var url;
	url=BaseHref + "contentmanagement/WSImageBrowseNOHeader.asp?Mode=Browse&Field=" + sfield;
	popw=window.open(url,"","dependent,scrollbars,location,width=640,height=500,resizable=yes");
}


function EditLinkList(llid) {
//Users:	WSCMTop.asp
	var url;
	url="WSLinkListEdit.asp?Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=640,height=500,resizable=yes");
}
function EditEvent(llid) {
//Users:	WSCMTop.asp

	var url;
	url="WSEventEdit.asp?Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=640,height=600,resizable=yes");
}

function LaunchSchedule(llid) {
//Users:	WSAssign.asp
//			AdminPanel.asp
//			schedule.inc

	var url;
	url="WSSchedule.asp?AssetTemplateSN=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=680,height=350,resizable=yes");
}
function LaunchScheduleSite(basehref,llid) {
//Users:	
//			AdminPanel.asp
//			schedule.inc
	var url;
	url=basehref + "WSSchedule.asp?AssetTemplateSN=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=680,height=350,resizable=yes");
}

function EditForum(llid) {
//Users:	WSCMTop.asp
	var url;
	url="WSForumEdit.asp?Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=640,height=500,resizable=yes");
}

function EditForumList(llid) {
//Users:	WSCMTop.asp
	var url;
	url="WSForumListEdit.asp?Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,scrollbars,location,width=640,height=500,resizable=yes");
}


function LaunchSelection(selectid,wsWebCenterID) {
//Users:	WSAddContent.asp
//			WSCMTop.asp
//			WSWCControl.asp
	var url;
	var name;
	if (selectid==1000) {
		url="WSAdvertisement.asp?Mode=Add";}
	if (selectid==1001) {
		url="WSStoryEdit.asp?Mode=Add&Edloc=1";}
	if (selectid==1002) {
		url="WSPoll.asp?Mode=Add";}
	if (selectid==1003) {
		url="WSEventEdit.asp?Mode=Add";}
	if (selectid==1004) {
		url="WSLinkEdit.asp?Mode=Add";}
	if (selectid==1005) {
		url="WSLinkListEdit.asp?Mode=Add";}
	if (selectid==1006) {
		url="WSCalendar.asp?Mode=Add";}
	if (selectid==1007) {
		url="WSMarketStats.asp?Mode=Add";}
	if (selectid==1008) {
		url="WSStoreListing.asp?Mode=Add";}
 	if (selectid==1009) {
		url="WSImageEdit.asp?Mode=Add";}
 	if (selectid==1010) {
		url="WSForumEdit.asp?Mode=Add";}
  	if (selectid==1011) {
		url="WSForumListEdit.asp?Mode=Add";}
  	if (selectid==1017) {
		url="WSClassifiedEdit.asp?Mode=Add";}
	if (selectid==1013) {
		url="WSEventListEdit.asp?Mode=Add";}
	if (selectid==1014) {
		url="WSSurvey.asp?Mode=Add";}
	if (selectid==1015) {
		url="WSTrial.asp?Mode=Add";}
	if (selectid==1016) {
		url="WSDirectoryEdit.asp?Mode=Add";}
	if (selectid==1018) {
		url="WSNewsFeedEdit.asp?Mode=Add";}
	if (selectid==1019) {
		url="WSMemorialEdit.asp?Mode=Add";}
	if (selectid==1020) {
		url="WSDocumentEdit.asp?Mode=Add";}
	if (selectid==1021) {
		url="WSVideoEdit.asp?Mode=Add";}
   name="Edit_" + wsWebCenterID;
  popw=window.open(url,name,"dependent,scrollbars,location,resizable=yes");
}
function LaunchAddContent(base,selectid,wsWebCenterID) {
//Users:	WSAddContent.asp
	var BaseHref;
	var url;
	var name;
	
	BaseHref=base;
	if (selectid==1000) {
		url=BaseHref + "WSAdvertisement.asp?Mode=Add";}
	if (selectid==1001) {
		url=BaseHref + "WSStoryEdit.asp?Mode=Add&Edloc=1";}
	if (selectid==1002) {
		url=BaseHref + "WSPoll.asp?Mode=Add";}
	if (selectid==1003) {
		url=BaseHref + "WSEventEdit.asp?Mode=Add";}
	if (selectid==1004) {
		url=BaseHref + "WSLinkEdit.asp?Mode=Add";}
	if (selectid==1005) {
		url=BaseHref + "WSLinkListEdit.asp?Mode=Add";}
	if (selectid==1006) {
		url=BaseHref + "WSCalendar.asp?Mode=Add";}
	if (selectid==1007) {
		url=BaseHref + "WSMarketStats.asp?Mode=Add";}
	if (selectid==1008) {
		url=BaseHref + "WSStoreListing.asp?Mode=Add";}
 	if (selectid==1009) {
		url=BaseHref + "WSImageEdit.asp?Mode=Add";}
 	if (selectid==1010) {
		url=BaseHref + "WSForumEdit.asp?Mode=Add";}
  	if (selectid==1011) {
		url=BaseHref + "WSForumListEdit.asp?Mode=Add";}
 // 	if (selectid==1013) {
//		url=BaseHref + "WSClassifiedEdit.asp?Mode=Add";}
  	if (selectid==1013) {
		url=BaseHref + "WSEventListEdit.asp?Mode=Add";}
	if (selectid==1014) {
		url=BaseHref + "WSSurvey.asp?Mode=Add";}
	if (selectid==1015) {
		url=BaseHref + "WSTrial.asp?Mode=Add";}
	if (selectid==1016) {
		url=BaseHref + "WSDirectoryEdit.asp?Mode=Add";}
	if (selectid==1018) {
		url=BaseHref + "WSNewsFeedEdit.asp?Mode=Add";}
	if (selectid==1019) {
		url=BaseHref + "WSMemorialEdit.asp?Mode=Add";}
	if (selectid==1020) {
		url=BaseHref + "WSDocumentEdit.asp?Mode=Add";}
	if (selectid==1021) {
		url=BaseHref + "WSVideoEdit.asp?Mode=Add";}
   name="Edit_" + wsWebCenterID;
  popw=window.open(url,name,"dependent,scrollbars,location,resizable=yes");
}
function LaunchEditDisplay(cntmgmtHref,selectid,cid,sid) {
//Users		AdminPanel.asp
	var url;
	var name;
	if (selectid==1000) {
		url=cntmgmtHref + "WSAdvertisement.asp?Mode=Edit&" + "ContentID=" + cid;}
	if (selectid==1001) {
		url=cntmgmtHref + "WSStoryEdit.asp?Edloc=1" + "&Mode=Edit&" + "ContentID=" + cid + "&SID=" + sid;}
	if (selectid==1002) {
		url=cntmgmtHref + "WSPoll.asp?Mode=Edit" + "&ContentID=" + cid + "&SID=" + sid;}
	if (selectid==1003) {
		url=cntmgmtHref + "WSEditEventList.asp";}
	if (selectid==1005) {
		url=cntmgmtHref + "WSLinkListEdit.asp?Mode=Edit" + "&ContentID=" + cid + "&SID=" + sid;}
	if (selectid==1006) {
		url=cntmgmtHref + "WSCalendar.asp?Mode=Edit" + "&ContentID=" + cid + "&SID=" + sid;}
	if (selectid==1007) {
		url=cntmgmtHref + "WSMarketStats.asp?Mode=Edit" + "&ContentID=" + cid + "&SID=" + sid;}
	if (selectid==1008) {
		url=cntmgmtHref + "WSStoreListing.asp?Mode=Edit" + "&ContentID=" + cid + "&SID=" + sid;}
 	if (selectid==1009) {
		url=cntmgmtHref + "WSImageEdit.asp?Mode=Edit" + "&ContentID=" + cid + "&SID=" + sid;}
 	if (selectid==1010) {
		url=cntmgmtHref + "WSForumEdit.asp?Mode=Edit" + "&ContentID=" + cid + "&SID=" + sid;}
  	if (selectid==1011) {
		url=cntmgmtHref + "WSForumListEdit.asp?Mode=Edit" + "&ContentID=" + cid + "&SID=" + sid;}
  	if (selectid==1013) {
		url=cntmgmtHref + "WSEventListEdit.asp?Mode=Edit" + "&ContentID=" + cid + "&SID=" + sid;}
	if (selectid==1014) {
		url=cntmgmtHref + "WSSurvey.asp?Mode=Edit" + "&ContentID=" + cid + "&SID=" + sid;}
	if (selectid==1015) {
		url=cntmgmtHref + "WSTrial.asp?Mode=Edit" + "&ContentID=" + cid + "&SID=" + sid;}
	if (selectid==1016) {
		url=cntmgmtHref + "WSDirectoryEdit.asp?Mode=Edit" + "&ContentID=" + cid + "&SID=" + sid;}
	if (selectid==1018) {
		url=cntmgmtHref + "WSNewsFeedEdit.asp?Mode=Edit" + "&ContentID=" + cid + "&SID=" + sid;}
	if (selectid==1019) {
		url=cntmgmtHref + "WSMemorialEdit.asp?Mode=Edit" + "&ContentID=" + cid + "&SID=" + sid;}
	if (selectid==1021) {
		url=cntmgmtHref + "WSVideoEdit.asp?Mode=Edit" + "&ContentID=" + cid + "&SID=" + sid;}
   name="Edit" + cid;
  popw=window.open(url,name,"dependent,scrollbars,location,width=670,height=600,resizable=yes");
}

function AddFileName(sfield,fname){
//Users:	WSImageBrowse.asp
//			

	window.opener.document.forms[0].item(sfield).value=fname;
	window.close()
}



function PlacementEdit(atsn,pid) {
//Users:	WSSchedule.asp
	var url
	url="WSSchedule.asp?Mode=Update&PID=" + pid + "&AssetTemplateSN=" + atsn;
	document.forms('form1').item('Action').value="Update";
	document.forms('form1').item('PID').value=pid;
	window.document.form1.submit();

}


function EditStory(baseurl,llid,iEdLoc) {
//Users:	WSCMTop.asp
//			edit.inc

	var url
	url=baseurl + "contentmanagement/WSStoryEdit.asp?Edloc=" + iEdLoc +"&Mode=Edit&ContentID=" + llid;
	popw=window.open(url,"","dependent,location,scrollbars,width=640,height=500,resizable=yes");
//	popw=showModalDialog(url);

}

function DisplayDebug(baseurl) {
//Users:	WSAddContent.asp
//			WSWCControl.asp
//			AdminHeader.asp
//			Header.asp
//			message.asp
//			post.asp
//			aspheader.inc
//			changepwd.asp
	var url
	url=baseurl + "contentmanagement/WSDebugShowVariables.asp";
	popw=window.open(url,"","dependent,scrollbars,width=640,height=500");
}




function UpdateSectionTree() {
//Users:	WSSecionTree.asp

	var url
	url="WSSectionTree.asp"
	parent.treeframe.location=url;
}

function formcheck(formObj)
{
var elName,elValue;


for (var i=0; i<formObj.length; i++)
  {	
  elName=formObj.elements[i].name;
 // alert('elName=' + elName + "  " + formObj.length);
  if (elName.indexOf('rqed')>0)
  {     elValue=formObj.elements[i].value;
		 if ((elValue == null) || (elValue.length == 0))
		 {alert("You must answer all required fields.");
		 return false;
		 }
  
  }
  }
return true;
}

function CheckForEmptyField(formobj,sname)
{
if (formobj.item(sname).value==null || formobj.item(sname).value=='')
 { alert("You must make an entry in the " + sname + " field.");
  return false;
  }
return true;
}


	/*
	(C) www.dhtmlgoodies.com, October 2005
	
	This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.	
	
	Terms of use:
	You are free to use this script as long as the copyright message is kept intact. However, you may not
	redistribute, sell or repost it without our permission.
	
	Thank you!
	
	www.dhtmlgoodies.com
	Alf Magne Kalleland
	
	*/	
	var tableWidget_tableCounter = 0;
	var tableWidget_arraySort = new Array();
	var tableWidget_okToSort = true;
	var activeColumn = new Array();
	var arrowImagePath = "/webcenter/images/";	// Path to arrow images
	
	function addEndCol(obj)
	{
		if(document.all)return;
		var rows = obj.getElementsByTagName('TR');
		for(var no=0;no<rows.length;no++){
			var cell = rows[no].insertCell(-1);
			cell.innerHTML = ' ';
			cell.style.width = '13px';
			cell.width = '13';

		}	
		
	}
	
	function highlightTableHeader()
	{
		this.className='tableWigdet_headerCellOver';
		if(document.all){	// I.E fix for "jumping" headings
			var divObj = this.parentNode.parentNode.parentNode.parentNode;
			this.parentNode.style.top = divObj.scrollTop + 'px';

		}
			
	}
	
	function deHighlightTableHeader()
	{
		this.className='tableWidget_headerCell';		
	}
	
	function mousedownTableHeader()
	{
		this.className='tableWigdet_headerCellDown';
		if(document.all){	// I.E fix for "jumping" headings
			var divObj = this.parentNode.parentNode.parentNode.parentNode;
			this.parentNode.style.top = divObj.scrollTop + 'px';
		}		
	}
	
	function sortNumeric(a,b){
		
		a = a.replace(/,/,'.');
		b = b.replace(/,/,'.');
		a = a.replace(/[^\d\-\.\/]/g,'');
		b = b.replace(/[^\d\-\.\/]/g,'');
		if(a.indexOf('/')>=0)a = eval(a);
		if(b.indexOf('/')>=0)b = eval(b);
		return a/1 - b/1;
	}
	

	function sortString(a, b) {

	  if ( a.toUpperCase() < b.toUpperCase() ) return -1;
	  if ( a.toUpperCase() > b.toUpperCase() ) return 1;
	  return 0;
	}	
	function cancelTableWidgetEvent()
	{
		return false;
	}
	
	function sortTable()
	{
		if(!tableWidget_okToSort)return;
		tableWidget_okToSort = false;
		/* Getting index of current column */
		var obj = this;
		var indexThis = 0;
		while(obj.previousSibling){
			obj = obj.previousSibling;
			if(obj.tagName=='TD')indexThis++;		
		}
		var images = this.getElementsByTagName('IMG');
		
		if(this.getAttribute('direction') || this.direction){
			direction = this.getAttribute('direction');
			if(navigator.userAgent.indexOf('Opera')>=0)direction = this.direction;
			if(direction=='ascending'){
				direction = 'descending';
				this.setAttribute('direction','descending');
				this.direction = 'descending';	
			}else{
				direction = 'ascending';
				this.setAttribute('direction','ascending');		
				this.direction = 'ascending';		
			}
		}else{
			direction = 'ascending';
			this.setAttribute('direction','ascending');
			this.direction = 'ascending';
		}
		
		
		
		if(direction=='descending'){
			images[0].style.display='inline';
			images[0].style.visibility='visible';
			images[1].style.display='none';
		}else{
			images[1].style.display='inline';
			images[1].style.visibility='visible';
			images[0].style.display='none';		
		}

		
		var tableObj = this.parentNode.parentNode.parentNode;
		var tBody = tableObj.getElementsByTagName('TBODY')[0];
		
		var widgetIndex = tableObj.id.replace(/[^\d]/g,'');
		var sortMethod = tableWidget_arraySort[widgetIndex][indexThis]; // N = numeric, S = String
		if(activeColumn[widgetIndex] && activeColumn[widgetIndex]!=this){
			var images = activeColumn[widgetIndex].getElementsByTagName('IMG');
			images[0].style.display='none';
			images[1].style.display='inline';
			images[1].style.visibility = 'hidden';
			if(activeColumn[widgetIndex])activeColumn[widgetIndex].removeAttribute('direction');			
		}

		activeColumn[widgetIndex] = this;
		
		var cellArray = new Array();
		var cellObjArray = new Array();
		for(var no=1;no<tableObj.rows.length;no++){
			var content= tableObj.rows[no].cells[indexThis].innerHTML+'';
			cellArray.push(content);
			cellObjArray.push(tableObj.rows[no].cells[indexThis]);
		}
		
		if(sortMethod=='N'){
			cellArray = cellArray.sort(sortNumeric);
		}else{
			cellArray = cellArray.sort(sortString);
		}
		
		if(direction=='descending'){
			for(var no=cellArray.length;no>=0;no--){
				for(var no2=0;no2<cellObjArray.length;no2++){
					if(cellObjArray[no2].innerHTML == cellArray[no] && !cellObjArray[no2].getAttribute('allreadySorted')){
						cellObjArray[no2].setAttribute('allreadySorted','1');	
						tBody.appendChild(cellObjArray[no2].parentNode);				
					}				
				}			
			}
		}else{
			for(var no=0;no<cellArray.length;no++){
				for(var no2=0;no2<cellObjArray.length;no2++){
					if(cellObjArray[no2].innerHTML == cellArray[no] && !cellObjArray[no2].getAttribute('allreadySorted')){
						cellObjArray[no2].setAttribute('allreadySorted','1');	
						tBody.appendChild(cellObjArray[no2].parentNode);				
					}				
				}			
			}				
		}
		
		for(var no2=0;no2<cellObjArray.length;no2++){
			cellObjArray[no2].removeAttribute('allreadySorted');		
		}

		tableWidget_okToSort = true;
		
		
	}
	
	function initTableWidget(objId,width,height,sortArray)
	{
		width = width + '';
		height = height + '';
		var obj = document.getElementById(objId);
		obj.parentNode.className='widget_tableDiv';
		if(navigator.userAgent.indexOf('MSIE')>=0){
			obj.parentNode.style.overflowY = 'auto';
		}		
		tableWidget_arraySort[tableWidget_tableCounter] = sortArray;
		if(width.indexOf('%')>=0){
			obj.style.width = width;
			obj.parentNode.style.width = width;
		}else{
			obj.style.width = width + 'px';
			obj.parentNode.style.width = width + 'px';
		}
		
		if(height.indexOf('%')>=0){
			//obj.style.height = height;		
			obj.parentNode.style.height = height;			
			
		}else{
			//obj.style.height = height + 'px';		
			obj.parentNode.style.height = height + 'px';
		}
		obj.id = 'tableWidget' + tableWidget_tableCounter;
		addEndCol(obj);
		
		obj.cellSpacing = 0;
		obj.cellPadding = 0;
		obj.className='tableWidget';
		var tHead = obj.getElementsByTagName('THEAD')[0];
		var cells = tHead.getElementsByTagName('TD');
		for(var no=0;no<cells.length;no++){
			cells[no].className = 'tableWidget_headerCell';
			cells[no].onselectstart = cancelTableWidgetEvent;
			if(no==cells.length-1){
				cells[no].style.borderRight = '0px';	
			}
			if(sortArray[no]){
				cells[no].onmouseover = highlightTableHeader;
				cells[no].onmouseout =  deHighlightTableHeader;
				cells[no].onmousedown = mousedownTableHeader;		
				cells[no].onmouseup = highlightTableHeader;		
				cells[no].onclick = sortTable;	
				
				var img = document.createElement('IMG');
				img.src = arrowImagePath + 'arrow_up_table.gif';
				cells[no].appendChild(img);	
				img.style.visibility = 'hidden';
				
				var img = document.createElement('IMG');
				img.src = arrowImagePath + 'arrow_down_table.gif';
				cells[no].appendChild(img);	
				img.style.display = 'none';
				
				
			}else{
				cells[no].style.cursor = 'default';	
			}
			
			
		}		
		var tBody = obj.getElementsByTagName('TBODY')[0];
		if(document.all && navigator.userAgent.indexOf('Opera')<0){
			tBody.className='scrollingContent';
			tBody.style.display='block';			
		}else{
			tBody.className='scrollingContent';

			if(tBody.offsetHeight>(tBody.parentNode.parentNode.offsetHeight - 50)) { 
				tBody.style.height = (obj.parentNode.clientHeight-tHead.offsetHeight) + 'px'; 
			}else{ 
				tBody.style.overflow='hidden'; 
			} 
			if(navigator.userAgent.indexOf('Opera')>=0){
				obj.parentNode.style.overflow = 'auto';
			}
		}
		
		for(var no=1;no<obj.rows.length;no++){
			obj.rows[no].onmouseover = highlightDataRow;
			obj.rows[no].onmouseout = deHighlightDataRow;
			for(var no2=0;no2<sortArray.length;no2++){	/* Right align numeric cells */
				if(sortArray[no2] && sortArray[no2]=='N')obj.rows[no].cells[no2].style.textAlign='right';
			}
		}
		for(var no2=0;no2<sortArray.length;no2++){	/* Right align numeric cells */
			if(sortArray[no2] && sortArray[no2]=='N')obj.rows[0].cells[no2].style.textAlign='right';
		}		
		
		tableWidget_tableCounter++;
	}
	
	
	function highlightDataRow()
	{
		if(navigator.userAgent.indexOf('Opera')>=0)return;
		this.className='tableWidget_dataRollOver';
		if(document.all){	// I.E fix for "jumping" headings
			var divObj = this.parentNode.parentNode.parentNode;
			var tHead = divObj.getElementsByTagName('TR')[0];
			tHead.style.top = divObj.scrollTop + 'px';
			
		}	
	}
	
	function deHighlightDataRow()
	{
		if(navigator.userAgent.indexOf('Opera')>=0)return;
		this.className=null;
		if(document.all){	// I.E fix for "jumping" headings
			var divObj = this.parentNode.parentNode.parentNode;
			var tHead = divObj.getElementsByTagName('TR')[0];
			tHead.style.top = divObj.scrollTop + 'px';
		}			
	}

	
	