//theObjects = document.getElementsByTagName("object");
//for (var i = 0; i < theObjects.length; i++) {
//theObjects[i].outerHTML = theObjects[i].outerHTML;
//}

function switchlangeng() {
 var loc = window.location + "";
 if (loc.indexOf("/tch/")>0){
    loc = loc.replace("/tch/","../eng/");
    if(loc.indexOf("/gallery_")>0){
    	loc = loc.substring(0,loc.indexOf("/gallery_")+1)+"gallery.asp";
    } 
 }else if (loc.indexOf("/sch/")>0){
    loc = loc.replace("/sch/","../eng/"); 
    if(loc.indexOf("/gallery_")>0){
    	loc = loc.substring(0,loc.indexOf("/gallery_")+1)+"gallery.asp";
    } 
 }else {
 	var vnum=loc.substring(loc.indexOf(":",loc.indexOf("apex"))+1,loc.indexOf(":",loc.indexOf(":",loc.indexOf("apex"))+1));
  if (vnum.length==4)
  loc = estconvert(loc,vnum,"0","2000");
  else if (vnum.length==3)
 	loc = estconvert(loc,vnum,"0","200");
}
 window.location = loc;
}
function switchlangtch() {
 var loc = window.location + "";
 if (loc.indexOf("../eng/")>0)
    loc = loc.replace("../eng/","/tch/");
 else if (loc.indexOf("/sch/")>0)
    loc = loc.replace("/sch/","/tch/"); 
 else {
 	var vnum=loc.substring(loc.indexOf(":",loc.indexOf("apex"))+1,loc.indexOf(":",loc.indexOf(":",loc.indexOf("apex"))+1));
  if ((vnum.length==1)||(vnum.length==2))
  loc = estconvert(loc,vnum,"2000","0");
  else if (vnum.length==3){
 	loc = estconvert(loc,vnum,"2000","200");
}
}
    
 window.location = loc;
}
function switchlangsch() {
 var loc = window.location + "";
 if (loc.indexOf("../eng/")>0){
    loc = loc.replace("../eng/","/sch/");
    if(loc.indexOf("/gallery_")>0){
    	loc = loc.substring(0,loc.indexOf("/gallery_")+1)+"gallery.asp";
    } 
 }else if (loc.indexOf("/tch/")>0){
    loc = loc.replace("/tch/","/sch/"); 
    if(loc.indexOf("/gallery_")>0){
    	loc = loc.substring(0,loc.indexOf("/gallery_")+1)+"gallery.asp";
    } 
 }else {
 	var vnum=loc.substring(loc.indexOf(":",loc.indexOf("apex"))+1,loc.indexOf(":",loc.indexOf(":",loc.indexOf("apex"))+1));
  if ((vnum.length==1) || (vnum.length==2))
  loc = estconvert(loc,vnum,"200","0");
  else if (vnum.length==4){
 	loc = estconvert(loc,vnum,"200","2000");
}
}    
 window.location = loc;
}