﻿// JScript File
var active;
var itemActive;

function init(){
    element = document.getElementById("loadingOverlayId");
    setOpacity(element, '88');
}

function select(item){
    //alert("Item to select: " + item);
    document.getElementById(item).style.backgroundColor = "#EFEFEF";
    document.getElementById(item).style.cursor = "pointer";
    document.getElementById(item).style.cursor = "hand";
    
}
function deselect(item){
    //alert("Item to select: " + item);
    if(active != item){
        document.getElementById(item).style.backgroundColor = "#f4f2ef";
        document.getElementById(item).style.cursor = "default";
    }
}
function showHideActions(item){    
    if(active == item){
        document.getElementById("actions_" + item).style.display = "none";
        active = null;
    } else {
        if(active != null){
            document.getElementById("actions_" + active).style.display = "none";
            document.getElementById(active).style.backgroundColor = "#f4f2ef";
        }
        document.getElementById("actions_" + item).style.display = "block";
        active = item;
    }
}


function setOpacity(element, opacity){
//alert(element);
	opacity = opacity/100;
	if (element.style.MozOpacity != null){element.style.MozOpacity = opacity;}
	if (element.style.opacity != null){element.style.opacity = opacity;}
	if (element.style.filter != null){element.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity="+(opacity*100)+")";}
}

function showOverlay(){
    document.getElementById('overlay').style.visibility = "visible";
}
function hideOverlay(){
    document.getElementById('overlay').style.visibility = "hidden";
}

function interneLink(page) {
	//window.open("http://www.chiro-oudebareel.be/" + page, "");
    var interneLink = location.href = "http://www.chiro-oudebareel.be/" + page;
}
	
function externeLink(url){
	if (url.indexOf("http://") == -1 && url.indexOf("https://") == -1 && url.indexOf("ftp://") == -1) {
		var externeLink = window.open("http://" + url, "_blank");
	} else {
		var externeLink = window.open(url, "_blank");
	}
}