window.showVersionAdminJs = function(){
	alert("admin.js Version 1.0.0");
};
window.getClientWidth = function(){
  var myWidth = 0;
  var fix;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    fix = 7;
    myWidth = document.body.clientWidth+fix;
  }
  return myWidth;
};
window.getClientHeight = function(){
  var myHeight = 0;
  var fix;
  //var iStatusBarHeight = 25;
  var iStatusBarHeight_Ie = 0;
  if(typeof(window.innerWidth) == 'number'){
    //Non-IE
    myHeight = window.innerHeight;
  }
  else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)){
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
    myHeight = myHeight + iStatusBarHeight_Ie;
  }
  else if(document.body && (document.body.clientWidth || document.body.clientHeight)){
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
  return myHeight;
};
window.getClientX = function(){
	var i;
	if(window.screenX){
		i = window.screenX;
	}
	else{
		i = window.screenLeft;
	}
	return i;
};
window.getClientY = function(){
	var i;
	if(window.screenY){
		i = window.screenY;
	}
	else{
		i = window.screenLeft;
	}
	if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
  	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    	//IE 6+ in 'standards compliant mode'
  	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    	//IE 4 compatible
		i = i + 3;
  	}
	return i;
};
window.opengp = function(sOpenInternalSharedObjectId){
	var w = 304;
	var fix = -3;
	var h = 641;// getClientHeight();
	var x = window.getClientX() + window.getClientWidth()+502;
	var y = window.getClientY();
	var iHairline = 1;
	if(!sOpenInternalSharedObjectId){
		window.top._gp = window.open('_admin/_lib/gp.html','gp','width='+(w+fix)+', height='+h+',top='+y+',screenY='+y+',left='+(x+iHairline)+',screenX='+(x+iHairline)+',location=no,menubar=no,resizable=no,titlebar=no,scrollbars=no,status=no,toolbar=no,directories=no');
	}
	else{
		window.top.cmsComm(sOpenInternalSharedObjectId,'openGeekPanelInternal');
	}
	//_w.moveby(0, 0);
};
window.opendl = function(){// dir listing
	var w = 504;
	var fix = -3;
	var h = 641;// getClientHeight();
	var x = window.getClientX() + window.getClientWidth()+502;
	var y = window.getClientY();
	var iHairline = 1;
	window.top._dl = window.open('_admin/_backend/php/getDirListing.php','dl','width='+(w+fix)+', height='+h+',top='+y+',screenY='+y+',left='+(x+iHairline)+',screenX='+(x+iHairline)+',location=no,menubar=no,resizable=no,titlebar=no,scrollbars=yes,status=no,toolbar=no,directories=no');
	//_w.moveby(0, 0);
};
window.loadsite = function(sSiteLangugeId, sSiteCountryId, sSitePortalId, sSiteDeploymentId){
	window.top.cmsComm('admin_locMainnav','loadSite',sSiteLangugeId, sSiteCountryId, sSitePortalId, sSiteDeploymentId);
};
window.openadmin = function(sOpenInternalSharedObjectId){
	window._sOpenInternalSharedObjectId = sOpenInternalSharedObjectId;
	if(!sOpenInternalSharedObjectId){
		window.loadIframe("cmsHidden2", "_admin/_lib/admin_swf/openadmin.html");
	}
	else{
		window._openadmin();
	}
};
window._openadmin = function(){
	var sOpenInternalSharedObjectId = window._sOpenInternalSharedObjectId;
	var w = 504;
	var fix = -3;
	var h = 641;// getClientHeight();
	var x = window.getClientX() + window.getClientWidth();
	var y = window.getClientY();
	var iHairline = 1;
	if(!sOpenInternalSharedObjectId){
		if(window.top.isBlockerEnabled(w+fix,h,y,x+iHairline) == true){
			alert("You must disable your popup-blocker first.");
		}
		else{
			window.top._w = window.open('../../../admin.html','admin','width='+(w+fix)+', height='+h+',top='+y+',screenY='+y+',left='+(x+iHairline)+',screenX='+(x+iHairline)+',location=no,menubar=no,resizable=no,titlebar=no,scrollbars=no,status=no,toolbar=no,directories=no');
		}
		window.top._w.onbeforeunload = function(){
			window.top._gp.close();
		}
	}
	else{
		window.top.cmsComm(sOpenInternalSharedObjectId,'openAdminInternal');
		window.top._w.close();
	}
	//_w.moveby(0, 0);
}
window.resizeadminheight = function(h){
	var sOpenInternalSharedObjectId = window._sOpenInternalSharedObjectId;
	var w = 504;
	var fix = -3;
	if(!sOpenInternalSharedObjectId){
			window.top._w.resizeTo(w+fix,h);
	}
	else{
		window.top.cmsComm(sOpenInternalSharedObjectId,'resizeAdmin',h);
		window.top._w.close();
	}
}
function moved(e) {
    popup.screenX = window.screenX + window.outerWidth;
    popup.screenY = window.screenY + window.outerWidth;
};
window.closeadmin = function(){
	//
};
