// onerror = stopError;
// function stopError () {
//   return true;
// }

// JavaScript Document
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

// Div Expander
function toggleBox (obj) {
	theObject = document.getElementById(obj);
	if (theObject.style.display == "block") {
		theObject.style.display = "none";
	} else {
		theObject.style.display = "block";
	}
}

function setClassName(objId, className) {
    	document.getElementById(objId).className = className;
}

function toggleClass (obj, c1, c2) {
	classObject = document.getElementById(obj);
	if (classObject.className == c1) {
		classObject.className = c2;
	} else {
		classObject.className = c1;
	}
}

function showLayer(layer) {
	if (document.all) {
		document.all[layer].style.visibility = "visible";
	} else if (document.layers) {
    	document.layers[layer].visibility = "visible";
	} else if (document.getElementById) {
    	document.getElementById(layer).style.visibility = "visible";
	}
}

function hideLayer(d) {
	hideBox(d);
}

function hideBox(d) {
	if(d.length < 1) { return; }
	document.getElementById(d).style.display = "none";
}

function showInfoLayer(content) {
	document.getElementById("infolayer").innerHTML= content;
	showFloatingBox('infolayer');
}

function showFloatingBox(d) {
	if(d.length < 1) { return; }
	var dd = document.getElementById(d);
	assignPosition(dd);
	dd.style.display = "block";
}

function assignPosition(dd) {
	 dd.style.left = (cX+10) + "px";
	 dd.style.top = (cY+10) + "px";
	
}

$(function(){
	 $("div.container_carousel").fadeIn({duration:2500});
     $("div.container_carousel").carousel( { 
			autoSlide: true,
			autoSlideInterval: 4000,
			loop: true,
			nextBtn: "<div class='next_button_test'></div>",
			prevBtn: "<div class='previous_button_test'></div>",
			pagination: true
		});
		
	$("a.fancypicture").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over'
	});		
 });
