var n7=document.getElementById?true:false
var ie5=document.all?true:false	
var n4=document.layers?true:false

function startEscalator(which) {
    var inn;
    var menu="menu"+(which.toString());
    if(ie5 || n7) {
      inn=document.getElementById(menu)
      inn.style.cursor="hand";
      inn.src = "images/esc_anim4.gif";
		}else if(n4){
		  document.menu.src="images/esc_anim4.gif";    
  }
}

function stopEscalator(which) {
    var out;
    var menu="menu"+(which.toString());
    if(ie5 || n7) {
      out=document.getElementById(menu);
		  out.src="images/esc_anim4out.gif";
      out.style.cursor="";			
    }else if(n4) {
		  document.menu.src="images/esc_anim4out.gif"; 
		}
}

function popupWorkshop() {
var params = "width=700,height=540,toolbar=no,status=no,location=no,menubar=no,scrollbars=yes,resizable=yes,directories=no";
var newWin = window.open("workshops.html", "workshops", params);
}

function popupPicture(theimg, wide, high) {
var wideness=chkScrn();
  if(wideness=="8") {
	  var wherestop=theimg.indexOf(".");
	  var leftpart = theimg.slice(0,wherestop);
		var rightpart = theimg.slice(wherestop, theimg.length);
		theimg = leftpart+"1"+rightpart;
	  wide = 600;
		high = 450;
    var howwide=wide+50;
    var howhigh=high+80;
    var params = "width="+howwide+",height="+howhigh+",toolbar=no,status=no,location=no,menubar=no,scrollbars=yes,resizable=yes,directories=no";
		
  }else{
    var howwide=wide+50;
    var howhigh=high+80;
    var params = "width="+howwide+",height="+howhigh+",toolbar=no,status=no,location=no,menubar=no,scrollbars=yes,resizable=yes,directories=no";
	}	
    var wintxt = "<html><head><title>Search Engine Optimisation Case Studies</title>"+
    "<meta name='description' content=''>"+
    "<meta name='keywords' content=''>"+
    "</head><body>"+
    "<img src='"+theimg+"', width='"+wide+"', height='"+high+"' alt=''>"+
    "<br><br><div align='right'>"+
    "<form><input type='button' value='&nbsp;&nbsp;&nbsp; Close &nbsp;&nbsp;&nbsp;' onclick='window.close()' style='text-align : center;'></form></div>"+
    "</body></html>"
    var newWin = window.open("_ablank.html", "MyWin", params); 
    newWin.document.writeln(wintxt);
//    newWin.document.write("<html><head><title></title></head><body>This is the popup</body></html>");
  
}


function chkScrn() {
  var scrnwidth;
  var howwide;
   scrnwidth=screen.width;
   if(scrnwidth<=800){
  return "8";
   }
   if(scrnwidth<=1024) {
  return "10";
   }else{
  return "12";
   }
}

