
	function ChangeMonthStatus(ar,tdAllmonthId,hid,arAllWeeks)
	{
		var tdAllmonth = document.getElementById(tdAllmonthId);
		if(ar.length>0)	ChangeColor(tdAllmonth);
		var tdAllmonth1 = document.getElementById(tdAllmonthId+"1");
		if(ar.length>0)	ChangeColor(tdAllmonth1);

		var tdColor = tdAllmonth.bgColor;
		for(var i = 0; i < ar.length; i++) 
		{
			var tdid = ar[i];
			var td = document.getElementById(tdid);
			ChangeOneCell(td, tdColor,hid);
			
		}
		for(var j = 0; j < arAllWeeks.length; j++) 
		{
			var tdid = arAllWeeks[j];
			var td = document.getElementById(tdid);
			td.bgColor = tdAllmonth.bgColor;
		}
		
	}
	function ChangeWeekStatus(ar,tdAllmonthId,hid)
	{
		var tdAllmonth = document.getElementById(tdAllmonthId);
		if(ar.length>0)	ChangeColor(tdAllmonth);
		var tdColor = tdAllmonth.bgColor;
		for(var i = 0; i < ar.length; i++) 
		{
			var tdid = ar[i];
			var td = document.getElementById(tdid);
			ChangeOneCell(td, tdColor,hid);
			
		}
	}
	function ChangeOneCell(td, color,hid)
	{
		while(td.bgColor != color)
		{
			var hCells = document.getElementById(hid);
			hCells.value = hCells.value + td.id + ";";
			ChangeColor(td);
		}
	}
	
	function ShowHint(evt,hintid,price)
	{
		//var price="13";
		var hints = document.getElementById(hintid);
		var msg=document.getElementById("sss")
		var s='';
		evt = (evt)?evt:(window.event)?window.event:""
		if (evt)
		{
			var newX
			var newY
			var x
			if(evt.pageX)
			{
			    x = evt.pageX
			    newX = x + 20
			}
			else
			{
				x = evt.x
				newX = x + 20
			}
			//evt.clientX
			var oBody = document.body;
			var y
			if(evt.pageY)
			{
				y = evt.pageY
				newY = y
			}
			else
			{
				y = evt.clientY + oBody.scrollTop
				newY = y 
			}
			
			//evt.clientY
			s='<table border="0" cellpadding="2" cellspacing="0" class="hintTable"><tr><td>'+price+'</td></tr>'+
			//'<tr><td>'+ oBody.scrollTop +'</td></tr>'+
			'</table>'
			hints.innerHTML=s;
			hints.style.postion="absolute";
			var newX = x + 20
			var newY = y
		}
		hints.style.top=newY
		hints.style.left=newX
		hints.style.visibility="visible"
	}
	function HideHint(hintid)
	{
		var hints = document.getElementById(hintid);
		hints.style.visibility="hidden"
		hints.innerHTML = '';
	}
	function DviClick(id)
	{
		
		var hCells = document.getElementById(hCellsID);
		hCells.value = hCells.value + id + ";";
		var divs = document.getElementById(id);
		var tds = divs.parentElement;	
		 ChangeColor(tds);
		
	}
	function TDClick(id,hs)
	{
		
		var hCells = document.getElementById(hs);
		hCells.value = hCells.value + id + ";";
		var tds = document.getElementById(id);
		//var tds = divs.parentElement;	
		 ChangeColor(tds);
		
	}
	function TDClickCls(id)
	{
		
		//var hCells = document.getElementById(hCellsID);
		//hCells.value = hCells.value + id + ";";
		var tds = document.getElementById(id);
		//var tds = divs.parentElement;	
		 ChangeClass(tds);
		
	}
	function ChangeClass(tds)
	{
		if(tds !=null)
		{
			//tds.class="newclass"
			//alert(tds.class)
		}
	}
	
	function ChangeColor(tds)
	{
		//var tds = document.getElementById(TDID);
		if(tds !=null)
		{
			if(tds.bgColor==Color3)
			{
				tds.bgColor=Color1
			}
			else
			{
				if(tds.bgColor==Color2)
				{
					tds.bgColor=Color3
				}
				else
				{
					if(tds.bgColor==Color1)
					{
						tds.bgColor=Color2
					}
					else
					{
						tds.bgColor=Color1
					}
				}
			}
		}
	}
	
	function ot()
{
	//popup.hide()  
	var msg=document.getElementById("sss")
	msg.style.visibility="hidden"
}



