var myimages=new Array()

//change the opacity for different browsers
function changeOpac(opacity, id) {
	var object = document.getElementById(id).style; 
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
}

function blendimage(divid, imageid, imagefile, millisec) {
	var speed = Math.round(millisec / 100);
	var timer = 0;
	
	//set the current image as background
	document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";
	
	//make image transparent
	changeOpac(0, imageid);
	
	//make new image
	document.getElementById(imageid).src = imagefile;
	//document.getElementById('HeroHref').href = newHref;
	
	//fade in image
	for(i = 0; i <= 100; i++) {
		setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
		timer++;
	}
}

function image_on(obj) {
	obj.src = prefix + "images/meniu/" + obj.id + "-on.gif";
}

function image_off(obj) {
	obj.src = prefix + "images/meniu/" + obj.id + "-off.gif";
}

function preloadimages(){
	for (i=0;i<preloadimages.arguments.length;i++){
		myimages[i]=new Image()
		myimages[i].src=preloadimages.arguments[i]
	}
}

function popupimage(image_path, width, height) {
	var popupwindow;
	var leftPos = (screen.availWidth-width) / 2
	var topPos = (screen.availHeight-height) / 2 
	popupWindow = window.open('popimage.php?image=' + image_path,'','width=' + width + ',height= ' + height + ',scrollbars=auto,resizable=no,titlebar=1,top=' + topPos + ',left=' + leftPos);
}

function popupharta(image_path, width, height) {
	var popupwindow;
	var leftPos = (screen.availWidth-width) / 2
	var topPos = (screen.availHeight-height) / 2 
	popupWindow = window.open('http://hotelcitadella.ro/popharta.php?image=' + image_path,'','width=' + width + ',height= ' + height + ',scrollbars=auto,resizable=no,titlebar=1,top=' + topPos + ',left=' + leftPos);
}
function popupharta2(image_path, width, height) {
    var popupwindow;
    var leftPos = (screen.availWidth-width) / 2
    var topPos = (screen.availHeight-height) / 2 
    popupWindow = window.open('http://hotelcitadella.ro/popharta2.php?image=' + image_path,'','width=' + width + ',height= ' + height + ',scrollbars=auto,resizable=no,titlebar=1,top=' + topPos + ',left=' + leftPos);
}

function popImage(imagename,width,height) {

}

function indent(target) {
	var i = document.getElementById(target);
	i.width=10;
}

function outdent(target) {
	var i = document.getElementById(target);
	i.width=0;
}
//blendimage('msviHero','msviHero01', 'images/hero_experience.jpg',500,'/windowsvista/experience.mspx')
//preloadimages(prefix + "images/meniu/software-logik-off.gif", prefix + "images/meniu/despre-logik-off.gif", prefix + "images/meniu/hardware-logik-off.gif", prefix + "images/meniu/servicii-logik-off.gif", prefix + "images/meniu/clientii-logik-off.gif");