///***********************************************************************///
///***<!-- Contains Copyrighted Materials by (c) ISPRODUCTIONS 2006 -->***///
///***********************************************************************///

	function popUp(URL) {
		day = new Date();
		id = day.getTime();
		//id = "ExifInfo";
		eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=620,height=400,left = 262,top = 50');");
		eval("page" + id + ".focus()");
	}
	function RenameLightbox() {
		var lname = document.getElementById("sphdnListName").value;
		var id = document.getElementById("lbId").value;
		if (lname != null )
			switch(lname.toLowerCase()) {
			case "" :
				alert("Please input list name first.");
				document.getElementById("sphdnListName").focus();
				break;
			case "default" :
				alert("The 'Default' name is reserved. Please enter another name");
				document.getElementById("sphdnListName").focus();
				break;
			default :
			    document.forms['lbListForm'].ren.value = 1;
				document.forms['lbListForm'].selList.value = id;
				document.forms['lbListForm'].lrname.value = lname;
				document.forms['lbListForm'].action = document.location.href;
				document.forms['lbListForm'].submit ();
				return true;
			}
	}
	
	function EmailLightbox(id)
	{
	    openAjaxPopup('emailLbLayer', 'EmailLightbox.asp?' + G_SecData + '&ListID=' + id, 850);
	    //showFullScreen(3, G_SecData + '&ListID='+id);
	}

	function PrintLightBox(id, guestId, grFeedback) 
	{
	    if (grFeedback == null || grFeedback == 'undefined') grFeedback = 0;
	    openAjaxPopup('printLbLayer', 'PrintLightbox.asp?' + G_SecData + '&ListID=' + id + '&GuestID='+guestId + (grFeedback == 1 ? '&grFeedback=1' : ''), 950);
		//showFullScreen(2, G_SecData + '&ListID='+id+'&GuestID='+guestId);
		////URL = 'PrintLightbox.asp?' + G_SecData + '&ListID='+id+'&GuestID='+guestId;
		////window.open(URL, "reorder", 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=1,width=620,height=400,left = 262,top = 50');		
	}
	
	function DwnLoadZipSelections(id, params)
	{
	    if (params == null || params == 'undefined') params = "";
	    
	    if (params.length > 0)
	    {
	        $.closePopupLayer('dwnZipLayer');
	    }
	    setTimeout("openAjaxPopup('dwnZipLayer', 'DownloadZipSelections.asp?" + G_SecData + "&ListID=" + id + params + "', 500)", 500);
	}
	
	function SetUsersRights(id)
	{
	    URL = 'SetUsersRights.asp?' + G_SecData + '&ListID='+id;
	    window.open(URL, "SetUserRights", 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=1,width=620,height=400,left = 262,top = 50');
	}
	
	function execTask(obj)
	{
		//var obj = document.getElementById("lightboxTasks");
		if(obj != null)
		{
			var indx = obj.selectedIndex;
			if(indx != -1)
			{
				eval(obj.options[indx].value);
			}
		}
	}

