	function open_new_sm(url, name, width, height, center, xtraparams) {
		var left;
		var top;
		if ( center ) {
			left = Math.round( (screen.availWidth/2) - (width/2));
			top = Math.round( (screen.availHeight/2) - (height/2));
		}
		else {
			left = window.screenLeft + 10;
			top = window.screenTop - 30;
			if ( (left + width/2) > screen.availWidth ||
					 (top + width/2) > screen.availHeight ) {
				left = 0;
				top = 0;
			}
		}
		var params = "height=" + height + ",width=" + width + ",left=" + left + ",top=" + top + ",screenX=" + left + ",screenY=" + top;
		if((xtraparams != "") && (xtraparams != null) && (xtraparams != undefined)){
		    params += xtraparams;
		} else {
		    params += "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1";
		}
		
		return window.open(url, name, params);
	}
	
	function open_delete_win(url, name){
	    open_new_sm(url,name,300,200, false, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");
	}

	function create(publisherpath,detFolderId,det,title) {
		open_new_sm(publisherpath + "/published_tools/content_item.jsp?fid=" + detFolderId + "&det=" + det + "&title=" + title + "", new Date().getTime().toString(),700,527);
	}

	function edit_item(publisherpath,item,title) 
	{
		open_new_sm(publisherpath + "/published_tools/content_item.jsp?ciid="+item+"&title=" + title, new Date().getTime().toString(),700,527);
	}

	function delete_item(publisherpath,folderPath, itemName)
	{
		//open_new_sm("http://por-portlets-tst.int.apps.safeco.com/ALUIUtilities/DeleteItem.aspx?folderPath="+folderPath+"&itemName="+itemName, new Date().getTime().toString(),300,250);
	}
	
	// This function is called when a new item or folder is created
	function SignalHandler(signal) {
		if (signal.name == "ReloadPage") {
			window.location.reload();
		}
		return true;
	}