function BreakFrames( ) {
   if ( window != top ) {
      top.location.href = location.href;
   }
}

function Bookmark( ) {
   if ( navigator.userAgent.indexOf("Opera") != -1 ) {
      alert("Press Ctrl + T to Bookmark This Webpage");
   } else if ( navigator.appName.indexOf("Microsoft") != -1 && parseInt(navigator.appVersion) >= 4 ) {
      window.external.AddFavorite('http://travel.theemiratesnetwork.com/','TEN Travel & Tourism');
   } else {
      alert("Press Ctrl + D to Bookmark This Webpage");
   }
}

function MM_openBrWindow(theURL,winName,features) { // Philipz Inc. v2004_03_04
  var popupFeatures = features.split(",");
  var FeatureValue;
  var newFeatures = "";
  var width = 0;
  var height = 0;
  for ( var x = 0; x < popupFeatures.length; x++ ) {
     FeatureValue = popupFeatures[x].split("=");
     if ( FeatureValue[0] == "width" ) {
        width = parseInt( FeatureValue[1] );
     } else if ( FeatureValue[0] == "height" ) {
        height = parseInt( FeatureValue[1] );
     } else {
        newFeatures = newFeatures + popupFeatures[x] + ",";
     }
  }
  features = newFeatures.substring(0,newFeatures.length-1);

  if ( width != 0 && height != 0 ) {
     var OperaAdjustment = 0;
     if (navigator.userAgent.indexOf('Opera') != -1) {
        var OperaVersionLoc = navigator.userAgent.indexOf('Opera') + 6;
        var OperaVersion = parseInt( navigator.userAgent.substring(OperaVersionLoc,OperaVersionLoc+4) );
        if ( OperaVersion >= 7 ) {
           width = width + 26;
           height = height + 6;
        }
        OperaAdjustment = 70;
     } else if (navigator.appName.indexOf('Netscape') != -1) {
        width = width + 16;
        height = height + 24;
     } else if (navigator.appName.indexOf('Microsoft') != -1) {
        width = width + 20;
        height = height + 30;
	if ( features.indexOf('scrollbars=yes') != -1 ) {
	   width = width + 20;
	}
     }
     features = "width=" + width.toString() + ",height=" + height.toString() + "," + features;
     resultsWindow = window.open(theURL,winName,features);

     var TopRightX = 20;
     var TopRightY = 20;

     if ( self.screen ) {
        TopRightX = ( screen.availWidth - width - 10 ) / 2;
        TopRightY = ( screen.availHeight - height - OperaAdjustment - 29 ) / 2;
        if ( TopRightY < 0 ) { TopRightY = 0; }
        if ( TopRightX < 0 ) { TopRightX = 0; }
     }

     resultsWindow.moveTo( TopRightX, TopRightY );
  } else {
     resultsWindow = window.open(theURL,winName,features);
  }
}

