
function logoff(){
    var Q = confirm("Er du sikker på du vil logge af?");
    if (Q) {
        window.location = "/logoff.php";
    }
}

function init(){
    //document.quick_find.keywords.focus();
}

function waitingWindow(string){
    document.getElementById('holder').innerHTML = string;
    myLightWindow.activateWindow({
        href: '#holder',
        type: 'inline',
        width: '700'
    
    });
}

window.onload = init;

//<!--
function imgPopUp(url, width, height){
    window.open('/popup_image2.php?url=' + url, 'imgPopUp', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=' + width + ',height=' + height + ',screenX=150,screenY=150,top=150,left=150');
}

//-->

function blink(elementid){
    colorarray = new Array('#000000', '#111111', '#222222', '#333333', '#444444', '#555555', '#666666', '#777777', '#888888', '#999999', '#AAAAAA', '#BBBBBB', '#CCCCCC', '#DDDDDD', '#EEEEEE', '#FFFFFF');
    i = 0;
    setInterval("changecolor('" + elementid + "')", 100);
    
}

function changecolor(x){

    var x = document.getElementById(x);
    if (x != null) {
        x.style.color = colorarray[i];
        if (i == 14) {
            i = 0;
            colorarray = colorarray.reverse();
        }
    }
    i++;
}

var tabs = {};
tabs.changeTab = function(tabId){
    if (tabs.oldTab) {
        document.getElementById(tabs.oldTab).className = '';
        document.getElementById(tabs.oldTab + '-tab').style.display = 'none';
    }
    
    document.getElementById(tabId).className = 'selected';
    document.getElementById(tabId + '-tab').style.display = 'block';
    
    tabs.oldTab = tabId;
};
tabs.oldTab = 'beskrivelse';



function changeImage(src){
    var obj = document.getElementById('prod_img');
    obj.src = src;
}

function changeHref(href){
    document.getElementById('chli').href = href;
}

