/*
 * Artikel Popup
*/
var popupStatus = 0;  
var activPopId = 0;

function loadPopup(){  
  if(popupStatus==0){  
    jQuery("#backgroundPopup").css({  
      "opacity": "0.85"  
    });  
    jQuery("#backgroundPopup").fadeIn("slow");  
    jQuery("#popWindow").fadeIn("slow");  
    popupStatus = 1;  
  }  
}  

function disablePopup(){  
  if(popupStatus==1){  
    jQuery("#backgroundPopup").fadeOut("slow");  
    jQuery("#popWindow").fadeOut("slow");  
      popupStatus = 0;  
    }  
}  

function centerPopup(){  
  if(popupStatus==1){ 
    var windowWidth = document.documentElement.clientWidth;
    var extraWinWidth = ((windowWidth-887)/2);
    var windowHeight = document.documentElement.clientHeight;  
    var popupHeight = jQuery("#popWindow").height();  
    var popupWidth = jQuery("#popWindow").width();  
    
    var finalWindowWidth = ((windowWidth/2-popupWidth/2)+1);
    //alert(windowWidth+" & "+windowHeight+" pop: "+popupWidth+" & "+popupHeight) ;
    jQuery("#popWindow").css({  
    "position": "absolute",  
    "top": 305/*windowHeight/2-popupHeight/2*/,  
    "left": finalWindowWidth  
    });  
    //only need force for IE6  
      
    jQuery("#backgroundPopup").css({  
      "height": windowHeight  
    });  
  }   
}  