// JavaScript Document
function showImage($id, $desc){
	window.open('large.php?id='+$id+'&desc='+$desc+'', 'Zoom', 'toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=1, width=400, height=300');
	return false;
}

function processLCH(){
	var $code = document.getElementById("lamp").firstChild.nextSibling.innerHTML;
	var $code = $code.split("_");
	var $code = $code[1].split(" ");
	eval("launch_support_"+$code[0]+"()");
}

function getHTTPObject(){
	if (window.ActiveXObject) 
		return new ActiveXObject("Microsoft.XMLHTTP");
	else if (window.XMLHttpRequest) 
		return new XMLHttpRequest();
	else {
		//alert("Your browser does not support AJAX.");
	return null;
	}
}

function getTZoffset(){
	httpObject = getHTTPObject();
	if (httpObject==null) return;
	
	var $visitortime = new Date();
	var $hours = $visitortime.getHours();
	
	var $url="usertime.php?hrz="+$hours;
	httpObject.open("GET", $url, true);
	httpObject.send(null);
	//httpObject.onreadystatechange=output;
}

function output(){
	alert(httpObject.responseText);
}

function swdateON($form){
	eval("document.forms['"+$form+"'].date").className = 'dateON';
}

function hideorshowMoveto($this){
	$target = document.forms['booking'];
	if($this.checked == true){
		$target.dstreetname.disabled = true;
		$target.dapartment.disabled = true;
		$target.dmunicipality.disabled = true;
		$target.dintersection1.disabled = true;
		$target.dintersection2.disabled = true;
		$target.dpostal.disabled = true;
		$target.adddropoff.disabled = true;
	}else{
		$target.dstreetname.disabled = false;
		$target.dapartment.disabled = false;
		$target.dmunicipality.disabled = false;
		$target.dintersection1.disabled = false;
		$target.dintersection2.disabled = false;
		$target.dpostal.disabled = false;
		$target.adddropoff.disabled = false;
	}
}

function initLater(){
	$this = document.forms['booking'].later;
	$target = document.forms['booking'];
	if($this.checked == true){
		$target.dstreetname.disabled = true;
		$target.dapartment.disabled = true;
		$target.dmunicipality.disabled = true;
		$target.dintersection1.disabled = true;
		$target.dintersection2.disabled = true;
		$target.dpostal.disabled = true;
		$target.adddropoff.disabled = true;
	}
}