
  /* +-----------------------------------------------------------------------+
     | Scripte
     +-----------------------------------------------------------------------+
     | Copyright (c) Firma Noname Media, www.nonamemedia.de
     | Developed by Andi Heinkelein, 19-Jun-2007
     +-----------------------------------------------------------------------+ */

	/* +------------------------- Script Config -----------------------------+ */
	
	
	
	/* +------------------------ Function/Class -----------------------------+ */
	
	function openVotingBox(votingLink, scriptId) {
	
		//öffne Vote Dialog
		CUR_SCRIPT = scriptId;
		
		voting(5, 140);
		jambo.layer.openContex('votingLayer', votingLink);
	}
	
	function voting(sum, clipWidth) {
	
		document.getElementById('votingImg').style.clip = "rect(auto, " + clipWidth + "px, auto, auto)";
		
		switch(sum) {
		
			case 1: var votingMsg = "sehr schlecht"; break;
			case 2: var votingMsg = "schlecht"; break;
			case 3: var votingMsg = "einigermaßen"; break;
			case 4: var votingMsg = "in Ordnung"; break;
			case 5: var votingMsg = "gut"; break;
			case 6: var votingMsg = "sehr gut"; break;
			case 7: var votingMsg = "absolute spitze"; break;
		}
		
		document.getElementById('votingMsg').innerHTML = votingMsg;
	}
	
	function vote(sum) {
	
		//Vote für Script
		window.open("vote?action=vote&script_id=" + CUR_SCRIPT + "&vote=" + sum);
	}
	
	function makePreview() {
	
		document.forms['form'].elements['action'].value = "preview";
		document.forms['form'].submit();
	}
	
	function saveScript() {
	
		document.forms['form'].elements['action'].value = "submit";
		document.forms['form'].submit();
	}
	
	/* +--------------------------- Events ----------------------------------+ */
	
	
	