// Create functions to support the menu that is to be used in the usermenu's
//
function DoIt(sAction) {

	if (sAction=='sitemap') {
		window.open ("Sitemap.asp","template");
	}

	if (sAction=='editsitemap') {
		window.open ("EditSitemap.asp","template");
	}

  if (sAction=='newpage') {
          window.open ("NewPage.asp?Page="+Page_Id,"newpage","width=490,height=190,toolbar=0,status=0,resizable=1");
  }
          
  if (sAction=='newtextfield') {
          window.open ("NewTextfield.asp?RecId="+RecId+"&PageId="+Page_Id,"newtextfield","width=705,height=420,toolbar=0,status=0,resizable=1");
  }
  
  if (sAction=='newHTMLfield') {
          window.open ("NewHTMLfield.asp?RecId="+RecId+"&PageId="+Page_Id,"newHTMLfield","width=685,height=420,toolbar=0,status=0,resizable=1");
  }
  
  if (sAction=='newimagefield') {
          window.open ("NewImagefield.asp?RecId="+RecId+"&PageId="+Page_Id+"&RepositoryId="+RepositoryId,"newImagefield","width=405,height=160,toolbar=0,status=0,resizable=1");
  }

  if (sAction=='newHyperlinkfield') {
    window.open ("NewHyperlinkfield.asp?RecId="+RecId+"&PageId="+Page_Id,"newHyperlinkfield","width=405,height=420,toolbar=0,status=0,resizable=1");
        }


  if (sAction=='newContribContainer') {
    window.open ("NewContribContainer.asp?RecId="+RecId+"&PageId="+Page_Id,"newContribContainer","width=405,height=360,toolbar=0,status=0,resizable=1");
        }


  if (sAction=='newUserContrib') {
    window.open ("NewUserContrib.asp?RecId="+RecId+"&PageId="+Page_Id,"newUserContrib","width=405,height=390,toolbar=0,status=0,resizable=1");
        }


	if (sAction=='preview') {
		window.open ("_preview.asp","Preview");
	}

}


function AddNewContribution(Session_Id) {
    window.open("NewContribField.asp?SessionId="+Session_Id,"Contribution","width=665,height=300,toolbar=0,status=0,resizable=1");
  }

function EditIt(iRecId,iType,iCItem_No,CIRecnum) {

        last = Last_CItem_No;

        // iType=1 means : image type
        if (iType==1) {
                window.open ("EditImagefield.asp?RecId="+iRecId+"&CItem_No="+iCItem_No+"&Last_CItem_No="+last+"&CIRecnum="+CIRecnum+"&RepositoryId="+RepositoryId,"editfield","width=326,height=140,toolbar=0,status=0,resizable=1");
        }

  // iType=2 means : HTML type
        if (iType==2) {
                window.open ("EditHTMLfield.asp?RecId="+iRecId+"&CItem_No="+iCItem_No+"&Last_CItem_No="+last+"&CIRecnum="+CIRecnum,"editfield","width=685,height=380,toolbar=0,status=0,resizable=1");
        }


        // iType=3 means : text type
        if (iType==3) {
                window.open ("EditTextfield.asp?RecId="+iRecId+"&CItem_No="+iCItem_No+"&Last_CItem_No="+last+"&CIRecnum="+CIRecnum,"editfield","width=685,height=380,toolbar=0,status=0,resizable=1");
        }


  // iType=7 means : Hyperlink
  if (iType==7) {
    window.open ("EditHyperlinkfield.asp?RecId="+iRecId+"&CItem_No="+iCItem_No+"&Last_CItem_No="+last+"&CIRecnum="+CIRecnum,"editfield","width=385,height=300,toolbar=0,status=0,resizable=1");
        }
}


function AddNewTextField() {
    window.open ("NewTextfield.asp?RecId="+RecId+"&PageId="+Page_Id,"newtextfield","width=705,height=420,toolbar=0,status=0,resizable=1");
}


function UploadRepository(RecId) {
    window.open ("Upload.asp?RecId="+RecId,"UploadRepository","width=555,height=360,toolbar=0,status=0,resizable=1");
}


function ListRepository(RecId) {
    window.open ("ListRepository.asp?RecId="+RecId,"ListRepository","width=555,height=360,toolbar=0,status=0,resizable=1");
}



function PublishContribution(RecId) {
    window.open ("PublishContribution.asp?RecId="+RecId,"PublishContribution","width=555,height=360,toolbar=0,status=0,resizable=1");
}

