// JavaScript Document

	function updateSelectnewa(cal) {
		var date = cal.date;
		var selectMonth = document.getElementById("datemonth");
		selectMonth.selectedIndex = date.getMonth();
		var selectDay = document.getElementById("dateday");
		selectDay.selectedIndex = (date.getDate() - 1);
		var selectYear = document.getElementById("dateyear");
		selectYear.selectedIndex = (date.getFullYear() - 2007);
	}

	function updateSelectnew2a(cal) {
		var date = cal.date;
		var selectMonth = document.getElementById("datemonth2");
		selectMonth.selectedIndex = date.getMonth();
		var selectDay = document.getElementById("dateday2");
		selectDay.selectedIndex = (date.getDate() - 1);
		var selectYear = document.getElementById("dateyear2");
		selectYear.selectedIndex = (date.getFullYear() - 2007);
	}

	function makeCurrentDatea()
	{
		var aaj = new Date();
		var currentTime = new Date()
		currentTime.setDate(currentTime.getDate()+30);

		document.frmSearch2.dateday.selectedIndex = (aaj.getDate() - 1);
		document.frmSearch2.datemonth.selectedIndex = aaj.getMonth();
		document.frmSearch2.dateyear.selectedIndex = (aaj.getYear() - 2007);

		document.frmSearch2.dateday2.selectedIndex = (currentTime.getDate() - 1);
		document.frmSearch2.datemonth2.selectedIndex = (currentTime.getMonth());
		document.frmSearch2.dateyear2.selectedIndex = (currentTime.getYear() - 2007);
	}



function getrandom_id(sz){
		var rand_value = new Array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "1", "2", "3", "4", "5", "6", "7", "8", "9");
		var rondo = rand_value.length;
		if ( sz > 0 )
		{
			var rand_id = '';
			for ( var i = 1; i <= sz; i++ )
			{
				var rnd_no = Math.floor(rondo*Math.random());
				rand_id += rand_value [ rnd_no ];
			}
		}
		return rand_id;
	}

	function setCookie(c_name,value,expiredays){
		var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);
		document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString());			
	}

