function findLivePageHeight(){

if(window.innerHeight)
return window.innerHeight;

if(document.documentElement.clientHeight) 

return document.documentElement.clientHeight;

if(document.body.clientHeight)
return document.body.clientHeight;

return null();

}




function findLivePageWidth(){

if(window.innerWidth)
return window.innerWidth;

if(document.documentElement.clientWidth) 

return document.documentElement.clientWidth;

if(document.body.clientWidth)
return document.body.clientWidth;

return null();

}

function secondSection(){

pageHeight = findLivePageHeight();
pageWidth = findLivePageWidth();

var remain2 = pageWidth - 225;

 

if(pageHeight < 575){
var object = document.getElementById('second-ad');
object.style.display = 'none';

}

if(pageHeight < 670){
  if(pageHeight > 575){
   
    var object = document.getElementById('second-ad');
    object.style.display = 'none';
   
   }
}



if(pageHeight > 670 ){
  if(pageHeight < 744){

   var object3 = document.getElementById('third-ad');
   object3.style.display = 'block';
   pageWidth = findLivePageWidth();



  }

}

if(pageHeight > 744){

object2.style.display = 'none';


var object3 = document.getElementById('third-ad');
object3.style.display = 'block';
 
 
   var remain = ((pageWidth - 200)/2);
  

object3.style.marginLeft=remain +'px';
object3.style.marginTop=90 +'px';




}



}





function openwindow()
{
window.open("Tourguide/Thealhondiga.php","_blank");
}

