function getScrollWidth() {
   var w = window.pageXOffset ||
           document.body.scrollLeft ||
           document.documentElement.scrollLeft;
		   
           
   return w ? w : 0;
}
function getScrollHeight() {
   var h = window.pageYOffset ||
           document.body.scrollTop ||
           document.documentElement.scrollTop;
           
   return h ? h : 0;
}
function hideScrollBars() {
document.body.scroll = "no";
document.documentElement.style.overflow = 'hidden';
}
function showScrollBars() {
document.body.scroll = "auto";
document.documentElement.style.overflowY = 'auto';
}
//
function showajaxurl(url){
	document.getElementById('ajax_iframe').src=url;
	ajaxshow();
}
//
function ajaxshow() {
	
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  
 document.getElementById("ajax_popup").style.top = getScrollHeight()+"px";
 document.getElementById("ajax_screen").style.top = (getScrollHeight()-20)+"px";
 document.getElementById("ajax_popup").style.myWidth = myWidth+"px";
 document.getElementById("ajax_popup").style.height = myHeight+"px";
 document.getElementById("ajax_popup").style.display = 'block';
 document.getElementById("ajax_screen").style.myWidth = myWidth+"px";
 document.getElementById("ajax_screen").style.height = (myHeight+40)+"px";
 document.getElementById("ajax_screen").style.display = 'block';
 
var nVer = navigator.appVersion;
var nAgt = navigator.userAgent;
var browserName  = navigator.appName;
var fullVersion  = ''+parseFloat(navigator.appVersion); 
var majorVersion = parseInt(navigator.appVersion,10);
var nameOffset,verOffset,ix;

// In Chrome, the true version is after "Chrome" 
 if ((verOffset=nAgt.indexOf("Chrome"))!=-1) {
}
// In Safari, the true version is after "Safari" 
else if ((verOffset=nAgt.indexOf("Safari"))!=-1) {
}
// In Firefox, the true version is after "Firefox" 
else if ((verOffset=nAgt.indexOf("Firefox"))!=-1) {
  document.getElementById("ajax_popup").style.top = "0px"; // Fix FF
  document.getElementById("ajax_screen").style.top = "0px"; // Fix FF
}

/* if (navigator.appName == 'Netscape'){
   document.getElementById("ajax_popup").style.top = "0px"; // Fix FF
   document.getElementById("ajax_screen").style.top = "0px"; // Fix FF
  // alert('f//'+navigator.appName);
 }*/
 //alert('f//'+navigator.appName);
// alert('f//'+navigator.userAgent);
 hideScrollBars();
}
function ajaxhide(){
 document.getElementById("ajax_popup").style.display = 'none';
 document.getElementById("ajax_screen").style.display = 'none';
 showScrollBars();
}
function ajaxprint(){
 ajax_iframe.focus();
 ajax_iframe.print(); 
}

function dna_popResize(){	
	if(document.getElementById("ajax_popup").style.display == 'block'){
		ajaxshow();
	}
	
}

