	function doPopup( url ){
		var win = window.open( "logic/" + url, null, "height=200,width=400,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes");
		if(!win)
		  alert("Please turn off or bypass your popup blocker");
	}
	function goGoGadgetGallery( imageNum ){
		var gallery = window.open( "imagegallery.php?returnNum=" + imageNum , null, "height=520,width=760,status=yes,toolbar=no,menubar=no,location=no,scrollbars=no");
		if(!gallery)
		  alert("Please turn off or bypass your popup blocker");
	}
	function goGoGadgetFileGallery( imageNum ){
		var gallery = window.open( "filegallery.php?returnNum=" + imageNum , null, "height=520,width=760,status=yes,toolbar=no,menubar=no,location=no,scrollbars=no");
		if(!gallery)
		  alert("Please turn off or bypass your popup blocker");
	}
	function setImage( imageNum , path ,imageHeight , imageID ){
		document.getElementById( 'dynamicImageField' + imageID ).value = imageNum;
		var imagePreview = document.getElementById( 'dynamicImage' + imageID );
		imagePreview.src = path;
		imagePreview.width = 150;
		imagePreview.height = imageHeight;
		imagePreview.className = "showBorder";
	}
	function setFile( fileNum , fileTitle , fileType , path , fileID ){
		// set fileID in hidden field
		document.getElementById( 'dynamicFileField' + fileNum ).value = fileID;
		// update title
		document.getElementById( 'dynamicFileTitle' + fileNum ).innerHTML = "<br/>" + fileTitle + " (" + fileType + ")";
		// update icon
		var imagePreview = document.getElementById( 'dynamicFile' + fileNum );
		imagePreview.src = path;
		imagePreview.width = 75;
		imagePreview.height = 75;
		imagePreview.className = "showBorder";
	}
	function checkPublishNameSet(){
		if( document.getElementById( 'publishNameField' ).value.length < 4 ){
			alert("Please provide a publish / reference name of at least 4 characters in length");
			return false;
		}
		return true;
	}
	function updateSearchTextDisabled( etID , atID ){
		var checkBox = document.getElementById( "searchCheck[" + etID + "][" + atID + "]" );
		var textField = document.getElementById( "searchText[" + etID + "][" + atID + "]" );
		if( !checkBox.checked ){
			textField.style.display = "none";
			textField.value = "0";
		}else{
			textField.style.display = "inline";
			textField.value = "1";
		}
	}
	function showIEDiv( idA , idB , state ){
		var divToShow = document.getElementById( "dropdown[" + idA + "][" + idB + "]" );
		if( state )
			divToShow.className = "dropdownOver";
		else
			divToShow.className = "dropdown";
	}
