
function flipbg(element,mode,colorOrg,aktiv,submenu)
  {
	if (mode=="in")
		{
      			
      			borltype = '0px solid #FF8F00'
      			if (submenu == 1)
	      			{
      				colorval = '#0480BA'
      				cursortype = 'pointer'
      				}
     			else
	      			{
	      			if (aktiv =="aktiv")
      					{
      					colorval = '#0480BA';
      					}
     				else
	      				{
	      				colorval = '#0480BA'
	      				cursortype = '';
	      				}
      				}
      				
      		
    		}
    	
	
	else if (mode=="out") 
		{
      			cursortype = '';
     			borltype = '0px solid silver';
      			if (submenu == 1)
      				{
      				colorval = 'transparent';
      				borltype = '0px solid white';
      				}
     			else
	      			{
	      	 		colorval = colorOrg;
	      			}
      		}
      
	if (aktiv =="aktiv")
      		{
      			if (submenu == 1)
      				{
      					colorval = 'transparent';
      				}
     			else
	      			{
	      				colorval = '#2A3C7E';
	      			}
      		}
   
  element.style.backgroundColor=colorval;
  element.style.cursor=cursortype;
  element.style.borderLeft = borltype;

}

   
   
function flipbmwbg(element,mode)
  {
	if (mode=="in")
		{
      			
      		bgcolorval = '#0480BA'
      		forecolorval = '#ffffff'
	      	cursortype = 'pointer';
	      	}
    	
	
	else if (mode=="out") 
		{
      			cursortype = '';
     			bgcolorval = 'transparent';
     			forecolorval = 'gray'
     			
      		}
  var elmL = document.getElementById("l"+element)  
  var elmR = document.getElementById("r"+element) 
  elmR.style.backgroundColor=bgcolorval;
  elmL.style.backgroundColor=bgcolorval;
  elmR.style.color=forecolorval;
  elmL.style.color=forecolorval;
  elmR.style.cursor=cursortype;
  elmL.style.cursor=cursortype;
 }
    
    function validateMini() {
     var feltet = document.getElementById('mbtxt');
     var error = 0;
     maxlength=300;
     if(feltet.value.length>=maxlength) {
          alert('Your comments must be ' + maxlength + ' characters or less');
          feltet.style.borderColor = 'red';
          feltet.style.color = 'red';
          feltet.focus();
          error = 1;
     }
     if(feltet.value.length<=0) {
          alert('Your comments must be longer then nothing !');
          feltet.style.borderColor = 'red';
          feltet.focus();
          error = 1;
     }
     
     if(error == 1)
     	{
     	return false;
     	}
     	else
     	{
        return true;
     	}
}



/***********************************************
* Disable select-text script- (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//form tags to omit in NS6+:
	var omitformtags=["input", "textarea", "select"]

	omitformtags=omitformtags.join("|")

function disableselect(e)
	{
	if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
	return false
	}
	function reEnable()
		{
		return true
		}
	
function ajaxManager()
	{
	var args = ajaxManager.arguments;
	switch (args[0])
		{
		case "load_page":
		el = document.getElementById(args[2]);
		el.innerHTML = 'Working';
		if (document.getElementById) {
			var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
			}
			if (x)
				{
			x.onreadystatechange = function()
					{
				if (x.readyState == 4 && x.status == 200)
						{
						//el = document.getElementById(args[2]);
						//el.innerHTML = x.responseText;
						document.getElementById('debugstr').innerHTML = x.responseText + '<br>';
						x.close;
						}
				else
					{
					
					}
					}
				document.getElementById('debugstr').innerHTML = document.getElementById('debugstr').innerHTML + args[1]+args[3]+args[4] + '<br'
				x.open("GET", args[1]+args[3]+args[4], false);
				x.send(null);
				}
			break;
		case "start_up":
			// ajaxManager('load_page', '/theme/xml/vagtxmlOut.asp?ver=<%=now()%>', 'testDiv','0','0');
			break;
		}
	}


	var MSIE = navigator.userAgent.indexOf('MSIE')>=0?true:false;
	var navigatorVersion = navigator.appVersion.replace(/.*?MSIE (\d\.\d).*/g,'$1')/1;
	
	var dragContentObj = false;
	var dragThisElement = false;
	var mouseoverObj = false;
	var lastMouseOverObj = false;
	var orgLocation = false;
	var drag = false;
	
// start dragging
function startDrag(e){
	
	// determine event object
	if(!e){var e=window.event};
	// determine target element
	targ = e.target?e.target:e.srcElement;
	if (targ.tagName != 'IMG')
	{
	closeitem('ddhl')
	dragThisElement= this; //e.target?e.target:e.srcElement;
	var cloneSourceItems = true;
	if(cloneSourceItems && dragThisElement.parentNode.id=='cloneme'){ //
				newItem = dragThisElement.cloneNode(true);
				newItem.onmousedown = dragThisElement.onmousedown;
				newItem.id = newItem.id + 'clone'
				dragThisElement = newItem;
			}
	//dragThisElement.style.width = 'auto';
	// if(dragThisElement.className!='vagt1'){return};
	// calculate event X,Y coordinates
	orgLocation = dragThisElement.parentNode;
	dragContentObj = document.getElementById('dragContainer');
	
	var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
	var sl = Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);
	
	
	dragContentObj.style.left = (e.clientX + sl) + 5 + 'px';
	dragContentObj.style.top = (e.clientY + st) + 5 +  'px';
	dragContentObj.appendChild(dragThisElement);
	dragContentObj.style.display = 'block';
	//document.getElementById('monitor').innerHTML = window.event.type
	drag=true;
	//move div element
	document.documentElement.onmousemove=dragDiv;
	}
}

// continue dragging
function dragDiv(e){
	if(!drag){return};
	if(!e){var e=window.event};
	mouseOverObj = e.target?e.target:e.srcElement;
	lastMouseOverObj = mouseOverObj;
	var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
	var sl = Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);
	dragContentObj.style.left = (e.clientX + sl) + 5 + 'px';
	dragContentObj.style.top = (e.clientY + st) + 5 + 'px';
	return false;
}

function getUpdateTimeScript(droppedID){
	script = document.getElementById('importTimeScript');
    	script.type = 'text/javascript';
    	script.src = ''
    	script.src = '/theme/js/vagtjsout2.asp?droppedID=' + droppedID;
	if (script.readyState == "loaded")
		{
        	eval(droptimeupdate());
        	eval(updateIdForEvent());
        	script.onreadystatechange = null;
        	}
       	else
       		{
        	script.onreadystatechange = CheckAgain;
       		}
       	}
       		

// stop dragging
function stopDrag(e){
	if(!e){var e=window.event};
	if(drag)
		{
		mouseOverObj = e.target?e.target:e.srcElement;
		//document.getElementById('testDiv2').innerHTML = lastMouseOverObj.id;
		if(lastMouseOverObj.className=='dropZone'){
			if (lastMouseOverObj.id != 'trash')
				{
				lastMouseOverObj.appendChild(dragThisElement);
				ajaxManager('load_page', '/theme/xml/vagtxmlOut.asp?ver=<%=now()%>', 'testDiv','&bID=' + dragThisElement.id,'&dz=' + lastMouseOverObj.id);				
				
				}
			else
				{
				// alert ("Kommet i skraldespanden");
				lastMouseOverObj.appendChild(dragThisElement);
				ajaxManager('load_page', '/theme/xml/vagtxmlOut.asp?ver=<%=now()%>', 'testDiv','&bID=' + dragThisElement.id,'&dz=' + lastMouseOverObj.id);
				lastMouseOverObj.removeChild(dragThisElement);
				
				}
			
			
			getUpdateTimeScript(dragThisElement.id)
			
			}
		else
			{
			
			orgLocation.appendChild(dragThisElement);
			};
		dragThisElement.style.display = 'block';
		dragContentObj.style.display = 'none';
		
		dragContentObj= false;
		mouseOverObj = false;
		lastMouseOverObj = false;
		drag=false;
		}
}

function weekLocker()
	{
	ajaxManager('load_page', '/theme/xml/unlockWeek.asp?ver=<%=now()%>', 'testDiv', '', '');
	}


function CheckAgain() {
  if (script.readyState == "loaded") {
      //alert("loaded again");
      eval(droptimeupdate());
      eval(updateIdForEvent());
      script.onreadystatechange = null;
    } 
}


function setMonitor(innerSTR){
	document.getElementById('monitor').innerHTML = innerSTR;	
}

function initDraggable(){
	var itemWidth = false;
	var draggableItemContainer1 = document.getElementById('eventcontainer');
	var draggableItems = draggableItemContainer1.getElementsByTagName('div');	// Get array containing all <DIV> in the vagtcontainer table
	var itemWidth = false;
	for(var no=0;no<draggableItems.length;no++){
		if (draggableItems[no].className != 'dropZone')
			{
				draggableItems[no].onmousedown = startDrag;
				draggableItems[no].style.cursor = 'pointer';
				if(itemWidth < draggableItems[no].offsetWidth) {itemWidth = draggableItems[no].offsetWidth}
			}
		
	}
	
	var draggableItemContainer2 = document.getElementById('vagtplantable');
	var draggableItemsx = draggableItemContainer2.getElementsByTagName('div');	// Get array containing all <DIV> in the vagtcontainer table
	var itemWidthx = false;
	for(var no=0;no<draggableItemsx.length;no++)
		{
		if (draggableItemsx[no].className != 'dropZone')
				{
				draggableItemsx[no].onmousedown = startDrag;
				draggableItemsx[no].style.cursor = 'pointer';
				//draggableItemsx[no].onkeypress = alert("hello");
				if(itemWidthx < draggableItemsx[no].offsetWidth) {itemWidthx = draggableItemsx[no].offsetWidth};
				}
		
		
		}
	
	
	
	
	for(var no=0;no<draggableItems.length;no++){
		draggableItems[no].style.width = itemWidth;
		
	}
	
	var draggableItemsy = document.getElementsByTagName('div');	// Get all Divs in document
	for(var no=0;no<draggableItemsy.length;no++)
		{
		if (draggableItemsy[no].className == 'dropZone')
			{
			 draggableItemsy[no].onmouseout = function () { this.style.borderWidth = '0px'; }
			 draggableItemsy[no].onmouseover = function () { if(drag) this.style.borderWidth = '1px'; }
			}
		
		}
	
	
	// document.documentElement.onmousemove=startDrag;
	document.documentElement.onmouseup=stopDrag;
}

function showCells(){
  	rows = document.getElementsByTagName("TABLE")['vagtPlanTable'].rows;
  	for(i=0;i<rows.length;i++)
  		{
    		cells = rows[i].cells;
    		for(j=0;j<cells.length;j++)
    			{
      			
    			}
  		}
  	alert(rows.length+" r&aelig;kker & "+cells.length+" celler");
}


function updateTimes(){
	

}


		
		/***********************************************
		* color/item picker script
		* place in <head> section
		*
		* use href="javascript:colorpicker(targetvar);"
		* to use and position colorscript
		*
		* targetvar being the id of the input box where docking and value is to go
		*
		***********************************************/
		
		var ns6=document.getElementById&&!document.all;
		var ie=document.all;
		
		document.write('<div id="ddhl" style="height:auto;width:auto;display:none;position:absolute;"></div>');
		document.write('<div id="cldropdownholder" style="display:none;position:absolute;"></div>');
		document.write('<div id="dropdownholder" style="height:200px;width:166px;overflow:auto;display:none;position:absolute;"></div>');
		
		window.onload=function(){	
			var colorvar = '<div id="clboxscript"><table style="background-color : white; width:300px;height:180px;border: 1px #000 solid;" cellpadding="0" cellspacing="0"><tr><td colspan="2" valign="middle" align="right"><div id="cldisp" style="height:16px;width:300px;"><input type="text" id="holder" name="holder" style="display:none;width: 1px;line-height:1px;" value=""><img style="cursor : pointer;" onClick="closeitem(\'cldropdownholder\');" src="/systemgraphics/cwclose.gif"></div></td></tr><tr><td><div id="gradientBox" style="width:200px;height:192px;background-color:white; z-index : 10000;"></div></td><td>';
			var total=1657;
			var X=Y=j=RG=B=0;
			var aR=new Array(total);
			var aG=new Array(total);
			var aB=new Array(total);
			for (var i=0;i<256;i++){
				aR[i+510]=aR[i+765]=aG[i+1020]=aG[i+5*255]=aB[i]=aB[i+255]=0;
				aR[510-i]=aR[i+1020]=aG[i]=aG[1020-i]=aB[i+510]=aB[1530-i]=i;
				aR[i]=aR[1530-i]=aG[i+255]=aG[i+510]=aB[i+765]=aB[i+1020]=255;
				if(i<255){
					aR[i/2+1530]=127;aG[i/2+1530]=127;aB[i/2+1530]=127;
				}
			}
			var hexbase=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");
			var i=0;
			var jl=new Array();
			for(x=0;x<16;x++)for(y=0;y<16;y++)jl[i++]=hexbase[x]+hexbase[y];
			colorvar = colorvar + '<table style="display : block;" border="0" cellspacing="0" cellpadding="0" onMouseover="t(event)" onClick="p()">';
			var H=W=63;
			for (Y=0;Y<=H;Y++){
				s='<tr height="3">';
				j=Math.round(Y*(510/(H+1))-255)
				for (X=0;X<=W;X++){
					i=Math.round(X*(total/W))
					R=aR[i]-j;if(R<0)R=0;if(R>255||isNaN(R))R=255
					G=aG[i]-j;if(G<0)G=0;if(G>255||isNaN(G))G=255
					B=aB[i]-j;if(B<0)B=0;if(B>255||isNaN(B))B=255
					s=s + '<td width="3" style="background-color:#' + jl[R]+jl[G]+jl[B] + ';"></td>'
				}
				colorvar= colorvar + s ;
			}
			colorvar = colorvar + '</tr></table></td></tr></table></div>';
			document.getElementById('cldropdownholder').innerHTML= colorvar;
		}
		
		
		var artabus='';
		var idcl = document.getElementById('holder');
		
		function p(){
			var jla=idcl;jla.value=artabus;
			var jlb=document.getElementById('cldisp');jlb.style.backgroundColor=artabus;		
			
		}
		
		function t(e){
			source=ie?event.srcElement:e.target
			if(source.tagName=="TABLE")return
			while(source.tagName!="TD" && source.tagName!="HTML")source=ns6?source.parentNode:source.parentElement
			document.getElementById('gradientBox').style.backgroundColor=artabus=source.style.backgroundColor
		}
		function closeitem(dropdown){
				var showf=document.getElementById(dropdown);
				showf.style.display="none";
		}
				
		function colorpicker(targetvar){
			closeitem('dropdownholder');
			idcl= document.getElementById(targetvar);
			document.getElementById('cldisp').style.backgroundColor=idcl.value;
			var cldropbox = document.getElementById('cldropdownholder');
			cldropbox.x=getposOffset(idcl, "left");
			cldropbox.y=getposOffset(idcl, "top");
			cldropbox.style.left=cldropbox.x+"px";
			cldropbox.style.top=cldropbox.y+20+"px";
			cldropbox.style.display= "";
		}
		
		function getposOffset(what, offsettype){
			var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
			var parentEl=what.offsetParent;
			while (parentEl!=null){
			totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
			parentEl=parentEl.offsetParent;
			}
			return totaloffset;
		}		
		
		function setColor()
			{
			document.getElementById('template').style.backgroundColor=document.getElementById('cssbackgroundColor').value;
			document.getElementById('template').style.color=document.getElementById('cssColor').value;
			}
		
		function showform(targetvar,formvar){
			load(targetvar,'',formvar);
		}
		
		function size1dout(targetvar){
			var size = document.getElementById("size1dbox").value ;
			size = size + 'px';
			var jla=document.getElementById(targetvar);jla.value=size;
			var dropbox = document.getElementById('dropdownholder');
			dropbox.style.display= "none";
		}
					
		function size4dout(targetvar){
			var size= document.getElementById("size4dtop").value;
			size = size + 'px ';
			size = size + document.getElementById("size4dright").value;
			size = size + 'px ';
			size = size + document.getElementById("size4dbottom").value;
			size = size + 'px ';
			size = size + document.getElementById("size4dleft").value;
			size = size + 'px ';
			var jla=document.getElementById(targetvar);jla.value=size;
			var dropbox = document.getElementById('dropdownholder');
			dropbox.style.display= "none";
		}
			var xmlDoc = null ;
			
			function load(targetvar,dbgroup,formvar){
				if (typeof window.ActiveXObject != 'undefined' ) {
				xmlDoc = new ActiveXObject("Microsoft.XMLHTTP");
				xmlDoc.onreadystatechange = process;
			}
			else {
				xmlDoc = new XMLHttpRequest();
				xmlDoc.onload = process;
			}
				xmlDoc.open( "GET", "http://lbwcms.poplog.dk/systemmodules/xml/dropdowncss.asp?dbgroup=" + dbgroup + "&target=" + targetvar + "&form=" + formvar + "&mohde=<%= now %>", false );
				xmlDoc.send( null );
			}
			
			function process(){
				if ( xmlDoc.readyState != 4 ) return ;
				var dropbox = document.getElementById('dropdownholder');
				dropbox.innerHTML = xmlDoc.responseText ;	
			}
			
			var targetvar = '';
			var dbgroup ='';
			
			function drawitemlist(targetvar,dbgroup){
				load(targetvar,dbgroup,'');
				targetvar = document.getElementById(targetvar);
				var dropbox = document.getElementById('dropdownholder');
				dropbox.x=getposOffset(targetvar, 'left');
				dropbox.y=getposOffset(targetvar, 'top');
				dropbox.style.left=dropbox.x+'px';
				dropbox.style.top=dropbox.y+20+'px';
				dropbox.style.display= "";
			}
			
			function chooseitem(targetvar,attribute){
				var tgt=document.getElementById(targetvar);tgt.value=attribute;
				closeitem('dropdownholder');
				
			}
		
		
		


/***********************************************
* Fixed ToolTip script- (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
		
var tipwidth='150px' //default tooltip width
var tipbgcolor='lightyellow'  //tooltip bgcolor
var disappeardelay=1250  //tooltip disappear speed onMouseout (in miliseconds)
var vertical_offset="-32px" //horizontal offset of tooltip from anchor link
var horizontal_offset="-200px" //horizontal offset of tooltip from anchor link

/////No further editting needed

if (ie||ns6)
document.write('<div id="fixedtipdiv" style="visibility:hidden;width:'+tipwidth+';" ><div id="tooltiptitle"></div><div id="tooltiptext"></div></div><div id="fixedtipdivline" style="visibility:hidden; display : block;"></div>')

function showhide(obj2, obj, e, visible, hidden, tipwidth)
	{
	if (ie||ns6)
	dropmenuobj.style.left=dropmenuobj.style.top=-500
	if (tipwidth!=""){
	dropmenuobj.widthobj=dropmenuobj.style
	dropmenuobj.widthobj.width=tipwidth
	}
	if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
		{
		//obj.filters[0].Apply();
		obj.visibility=visible
		obj2.visibility=visible
		//obj.filters[0].Play();
		}
	else if (e.type=="click")
		{
		obj.visibility=hidden
		obj2.visibility=hidden
		}
	}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}


function clearbrowseredge(obj, whichedge){
	var edgeoffset=(whichedge=="rightedge")? parseInt(horizontal_offset)*-1 : parseInt(vertical_offset)*-1
	if (whichedge=="rightedge"){
		var windowedge=ie && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
		dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
		if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
			edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth
		}
	else{
		var windowedge=ie && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
		dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
		if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
			edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
		}
	return edgeoffset
	}

function fixedtooltip(tooltiptitle,menucontents, obj, e, tipOffSet)
	{
	if (window.event) 
		event.cancelBubble=true
	else if 
		(e.stopPropagation) e.stopPropagation()
	clearhidetip()
	dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
	dropmenuobj2=document.getElementById("fixedtipdivline")
	tttitleobj=document.getElementById("tooltiptitle")
	tttextobj=document.getElementById("tooltiptext")
	tttextobj.innerHTML=menucontents
	tttitleobj.innerHTML=tooltiptitle
	
	if (ie||ns6)
		{
		showhide(dropmenuobj2.style,dropmenuobj.style, e, "visible", "hidden", tipwidth)
		dropmenuobj.x=getposOffset(obj, "left")
		dropmenuobj.y=getposOffset(obj, "top")
		dropmenuobj.style.left=dropmenuobj.x-(209-tipOffSet)+"px" 
		dropmenuobj.style.top=dropmenuobj.y+"px" 
		dropmenuobj2.style.left=dropmenuobj.x-53+"px"
		dropmenuobj2.style.top=dropmenuobj.y+"px"
		}
	}


function hidetip(e){
if (typeof dropmenuobj!="undefined"){
if (ie||ns6)
	{
	dropmenuobj.style.visibility="hidden"
	dropmenuobj2.style.visibility="hidden"
	}
}
}

function delayhidetip(disappeardelay){
if (ie||ns6)
delayhide=setTimeout("hidetip()",disappeardelay)
}

function clearhidetip(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

var ElementToUpdate = null;
var xmlDoc = null ;

function loadAny(remoteDocURL,syncVar){
				if (typeof window.ActiveXObject != 'undefined' ) {
				xmlDoc = new ActiveXObject("Microsoft.XMLHTTP");
				xmlDoc.onreadystatechange = processAny;
			}
			else {
				xmlDoc = new XMLHttpRequest();
				xmlDoc.onload = processAny;
			}
				xmlDoc.open( "GET", remoteDocURL, syncVar );
				xmlDoc.send( null );
			}

function processAny(){
				//alert(ElementToUpdate);
				if ( xmlDoc.readyState != 4 ) return ;
				document.getElementById(ElementToUpdate).innerHTML = xmlDoc.responseText ;	
			}

function ajaxPopUp(PositionByElement,remoteDocURL,ElToUpdate,syncVar){
				ElementToUpdate = ElToUpdate
				PBElement = document.getElementById(PositionByElement)
				loadAny(remoteDocURL,ElementToUpdate,syncVar);
				var showf=document.getElementById(ElementToUpdate);
				if (ie){
					showf.style.display= "none";
					showf.filters[0].Apply();
					}
				showf.x=getposOffset(PBElement, 'left');
				showf.y=getposOffset(PBElement, 'top');
				showf.style.left=showf.x+'px';
				showf.style.top=showf.y+20+'px';
				showf.style.display= "";
				if (ie){
					showf.filters[0].Play();
					}
			}

function closeitem(dropdown){
				var showf=document.getElementById(dropdown);
				showf.style.display="none";
			}
			
function SetEventStyle(targetEvent,sE,evstid){
	var tE = document.getElementById(targetEvent)
	//var sE = document.getElementById(sourceEvent)
	tE.style.color = sE.style.color;
	tE.style.backgroundColor = sE.style.backgroundColor;
	document.getElementById('evtsid').value=evstid	
	}

function changeEventWeight(jseventID,bookingId,divID){
	ajaxPopUp(jseventID,'/theme/xml/updateWeight.asp?bookingID=' + bookingId +'&divID=' + divID + '&mohde=<%= now() %>','ddhl','True');
	}

function updateEventWeight(bookingID,newWeight,divID){
	elm = document.getElementById(divID);
	var saveHtml = elm.innerHTML;
	elm.innerHTML = 'Opdaterer';
	loadAny('/theme/xml/spxupdateWeight.asp?bookingID=' + bookingID +'&newWeight=' + newWeight + '&<%= cache %>',false)
	elm.title = 'V&aelig;gt : ' + newWeight;
	elm.innerHTML = saveHtml
	getUpdateTimeScript(divID)
	setTimeout("closeitem('ddhl')",1000);
	}
/***********************************************
* color/item picker script
* place in <head> section
*
* use href="javascript:colorpicker(targetvar);"
* to use and position colorscript
*
* use href="javascript:drawitemlist(targetvar,groupname);"
* to use and position itemscript
*
* targetvar being the id of the input box where docking and value is to go
* groupname being the name of the desired css tag I.E background-attachment or font-family
*
***********************************************/

