<!--
function createRequestObject(){
	if (navigator.appName == 'Microsoft Internet Explorer') {
		return new ActiveXObject('Microsoft.XMLHTTP');
	}	else {
		return new XMLHttpRequest();
	}
}

function ajax(obj, source){
 var http = createRequestObject();
 http.open('get', source);

 http.onreadystatechange = function(){
 	if (http.readyState == 4) {
 		document.getElementById(obj).innerHTML = http.responseText;
 	}
 }
	http.send(null);
}

function resizeWindow(){	
 nWidth  = document.images[0].width;
 nHeight = document.images[0].height;

 if(window.innerWidth){
  window.innerWidth  = nWidth;
  window.innerHeight = nHeight;
 }else if(document.all){
 	cWidth   = document.documentElement.clientWidth;
 	cHeight  = document.documentElement.clientHeight;
  cWidth  -= (cWidth - nWidth);
  cHeight -= ((cHeight - nHeight));
  window.resizeTo(cWidth + 12, cHeight + 50);
 } 
}

function toggleDiv(id, selected, select){
 var divDiv = document.getElementById(id);
 if(selected == select){
  divDiv.style.display = "block";
 }else{
  divDiv.style.display = "none";  
 }
}

function ableElement(id, selected, select){
 if(selected == select){
  document.getElementById(id).disabled              = false;
  document.getElementById(id).style.backgroundColor = "FFFFFF";
 }else{
  document.getElementById(id).disabled              = true;
  document.getElementById(id).style.backgroundColor = "D4D0C8";
 }
}

function switchPhoto(obj, root){
 document.getElementById('photo').src = obj.href;
 document.getElementById('photo').alt = obj.firstChild.getAttribute('alt');
	href = root + 'zoom.php?img=' + obj.href.replace('large', 'extra_large');
 document.getElementById('zoom').href = href;
}

function toggleCheckboxes(id){
	var frm_elements = document.getElementById('frm_book').elements;
	
 for(var i = 0; i < frm_elements.length; i++){
 	var pos1 = frm_elements[i].id.indexOf("_") + 1;
 	var pos2 = id.indexOf("_") + 1;
 	if(frm_elements[i].id.substring(pos1) == id.substring(pos2)){
 		
 		
 		if(document.getElementById(id).checked == false){ 		
 		 frm_elements[i].checked = false;
 		 frm_elements[i].parentNode.parentNode.style.backgroundColor='#EEEEEE';
 		 document.getElementById(id).parentNode.parentNode.style.backgroundColor='#EEEEEE';
 		}else{
 			frm_elements[i].checked = true;
 			frm_elements[i].parentNode.parentNode.style.backgroundColor='#6FF664';
 			document.getElementById(id).parentNode.parentNode.style.backgroundColor='#6FF664';
 		}
 	}
 }
}

function atLeastOneWeekSelected(msg){
	var frm_elements = document.getElementById('frm_book').elements;
	var _atLeastOneWeekSelected = false;
	
	for(var i = 0; i < frm_elements.length; i++){
		if (frm_elements[i].checked && !frm_elements[i].disabled) _atLeastOneWeekSelected = true; 		
	}
	if (_atLeastOneWeekSelected) {
		return (true);
	} else {
		alert(msg);
		return (false);
	}
}

function getElementsByClassName(classname,node){
	if(!node) node = document.getElementsByTagName('body')[0];
	var a = [];
	var re = new RegExp('\\b' + classname + '\\b');
	var els = node.getElementsByTagName("*");

	for(var i=0,j=els.length; i<j; i++)
		if(re.test(els[i].className))
			a.push(els[i]);
		return a;
}

function closeWeek(chk_id){
	var foundTags = getElementsByClassName(chk_id);
	for (i = 0; i < foundTags.length; i++) {
		foundTags[i].parentNode.parentNode.style.backgroundColor='#F25757';
	}
}

function checkedWeek(chk_id){
	var foundTags = getElementsByClassName(chk_id);
	for (i = 0; i < foundTags.length; i++) {
		foundTags[i].parentNode.parentNode.style.backgroundColor='#6FF664';
	}
}

function toggleCheckboxesNew(id, chk_id){
	var foundTags = getElementsByClassName(chk_id);
	
	for (i = 0; i < foundTags.length; i++) {
		if (!document.getElementById(id).checked) { 
			foundTags[i].checked = false;
			foundTags[i].parentNode.parentNode.style.backgroundColor='#EEEEEE';
		} else {
			foundTags[i].checked = true;
			foundTags[i].parentNode.parentNode.style.backgroundColor='#6FF664';
		}
	}
}

function showErrorlist() {
	var errorList = '';
	var oP = document.body.getElementsByTagName("big");
	for (var i = 0; i < oP.length; i++) {
		var oS = oP[i].getElementsByTagName("span")[0];
		oP[i].removeChild(oS);        
		errorList += oP[i].innerHTML+'<br />';
		oP[i].appendChild(oS);        
	}
	if (errorList != '') {
		errorList = '<img src=\'../../gfx/alert.gif\'>' + errorList;
		div = document.getElementById("frm_contact");
		fieldset = document.getElementsByTagName("fieldset")[0];
		newnode = document.createElement("div");
		newnode.innerHTML = errorList;
		newnode.className = "errorfield";	
		div.insertBefore(newnode, fieldset);
	}
}

// -->