function swap(obj,img, activate)
{
	var onOff="";
	var flip=true;
	if(activate)
	{
		onOff="On";
	}
	else
	{
		if(id==img)
			flip=false;
	}
	
	if(flip)
		obj.src="images/M"+img+onOff+".gif";
}
var src="";
function Preload(){
MM_preloadImages('images/'+src+'M1On.gif','images/'+src+'M2On.gif','images/'+src+'M3On.gif','images/'+src+'M4On.gif','images/'+src+'M5On.gif','images/'+src+'M6On.gif','images/'+src+'M7On.gif','images/'+src+'M8On.gif','images/'+src+'M9On.gif');
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function ShowSub(x)

{ 
	var s1 = document.getElementById("s1");	
	var s2 = document.getElementById("s2");	
	var s3 = document.getElementById("s3");
	var s4 = document.getElementById("s4");
	var dataArr= new Array();
	dataArr[0]=new Array(s1,s2,s3,s4);
	document.getElementById("Sub1").innerHTML=dataArr[0][x-1].innerHTML;
	
	return false;
}
function alternate(id){ 
 if(document.getElementsByTagName){  
   var table = document.getElementById(id);   
   var rows = table.getElementsByTagName("tr");   
   for(i = 0; i < rows.length; i++){           
 //manipulate rows 
     if(i % 2 == 0){ 
       rows[i].className = "even"; 
     }else{ 
       rows[i].className = "odd"; 
     }       
   } 
 } 
}

function ShowBigC(name,x)
{
  var width="800", height="600";
  var left = (screen.width/2) - width/2;
  var top = 0;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var msgWindow = window.open("","msgWindow", styleStr);
  var head = '<head><title>.: My School My Community :.</title></head>';
  var body = '<center><img src="images/gallery/'+name+x+'.jpg"><br>';
  msgWindow.document.write(head + body);
}
function ShowBigCN(name,x)
{
  var width="800", height="600";
  var left = (screen.width/2) - width/2;
  var top = 0;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var msgWindow = window.open("","msgWindow", styleStr);
  var head = '<head><title>.: My School My Community :.</title></head>';
  var body = '<center><img src="images/north/'+name+x+'.jpg"><br>';
  msgWindow.document.write(head + body);
}
function ShowBigCS(name,x)
{
  var width="800", height="600";
  var left = (screen.width/2) - width/2;
  var top = 0;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var msgWindow = window.open("","msgWindow", styleStr);
  var head = '<head><title>.: My School My Community :.</title></head>';
  var body = '<center><img src="images/south/'+name+x+'.jpg"><br>';
  msgWindow.document.write(head + body);
}
function ShowBig41(name,x)
{
  var width="800", height="600";
  var left = (screen.width/2) - width/2;
  var top = 0;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var msgWindow = window.open("","msgWindow", styleStr);
  var head = '<head><title>.: My School My Community :.</title></head>';
  var body = '<center><img src="images/sample4-1/'+name+x+'.jpg"><br>';
  msgWindow.document.write(head + body);
}
function ShowBig21(name,x)
{
  var width="800", height="600";
  var left = (screen.width/2) - width/2;
  var top = 0;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var msgWindow = window.open("","msgWindow", styleStr);
  var head = '<head><title>.: My School My Community :.</title></head>';
  var body = '<center><img src="images/sample2-1/'+name+x+'.jpg"><br>';
  msgWindow.document.write(head + body);
}
function ShowBig22(name,x)
{
  var width="800", height="600";
  var left = (screen.width/2) - width/2;
  var top = 0;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var msgWindow = window.open("","msgWindow", styleStr);
  var head = '<head><title>.: My School My Community :.</title></head>';
  var body = '<center><img src="images/sample2-2/'+name+x+'.jpg"><br>';
  msgWindow.document.write(head + body);
}
function ShowBig23(name,x)
{
  var width="800", height="600";
  var left = (screen.width/2) - width/2;
  var top = 0;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var msgWindow = window.open("","msgWindow", styleStr);
  var head = '<head><title>.: My School My Community :.</title></head>';
  var body = '<center><img src="images/sample2-3/'+name+x+'.jpg"><br>';
  msgWindow.document.write(head + body);
}
function ShowBig24(name,x)
{
  var width="800", height="600";
  var left = (screen.width/2) - width/2;
  var top = 0;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var msgWindow = window.open("","msgWindow", styleStr);
  var head = '<head><title>.: My School My Community :.</title></head>';
  var body = '<center><img src="images/sample2-4/'+name+x+'.jpg"><br>';
  msgWindow.document.write(head + body);
}
function ShowBigCB(name,x)
{
  var width="800", height="600";
  var left = (screen.width/2) - width/2;
  var top = 0;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var msgWindow = window.open("","msgWindow", styleStr);
  var head = '<head><title>.: My School My Community :.</title></head>';
  var body = '<center><img src="images/bekaa/'+name+x+'.jpg"><br>';
  msgWindow.document.write(head + body);
}
function ShowBigCG(name,x)
{
  var width="800", height="600";
  var left = (screen.width/2) - width/2;
  var top = 0;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var msgWindow = window.open("","msgWindow", styleStr);
  var head = '<head><title>.: My School My Community :.</title></head>';
  var body = '<center><img src="images/general/'+name+x+'.jpg"><br>';
  msgWindow.document.write(head + body);
}
function ShowBigCGLika2(name,x)
{
  var width="800", height="600";
  var left = (screen.width/2) - width/2;
  var top = 0;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var msgWindow = window.open("","msgWindow", styleStr);
  var head = '<head><title>.: My School My Community :.</title></head>';
  var body = '<center><img src="images/lika2/'+name+x+'.jpg"><br>';
  msgWindow.document.write(head + body);
}
function ShowBigCG78nov(name,x)
{
  var width="800", height="600";
  var left = (screen.width/2) - width/2;
  var top = 0;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var msgWindow = window.open("","msgWindow", styleStr);
  var head = '<head><title>.: My School My Community :.</title></head>';
  var body = '<center><img src="images/7-8nov/'+name+x+'.jpg"><br>';
  msgWindow.document.write(head + body);
}
function ShowBigRetreat(name,x)
{
  var width="800", height="600";
  var left = (screen.width/2) - width/2;
  var top = 0;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var msgWindow = window.open("","msgWindow", styleStr);
  var head = '<head><title>.: My School My Community :.</title></head>';
  var body = '<center><img src="images/retreat/'+name+x+'.jpg"><br>';
  msgWindow.document.write(head + body);
}
function ShowSubKey(x,total){
	var p;
	for(var i=1;i<=total;i++)
	{
		p = eval("document.getElementById(\"Key"+i+"\");");
		if(x==i){
			if(p.style.display=='none')
				p.style.display='block';
			else{
			p.style.display='none';
			}
		}
		else{
			p.style.display='none';
		}
	}
}
	
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function newWindow(a_str_windowURL, a_str_windowName, a_int_windowWidth, a_int_windowHeight, a_bool_scrollbars, a_bool_resizable, a_bool_menubar, a_bool_toolbar, a_bool_addressbar, a_bool_statusbar, a_bool_fullscreen) {
  var int_windowLeft = (screen.width - a_int_windowWidth) / 2;
  var int_windowTop = (screen.height - a_int_windowHeight) / 2;
  var str_windowProperties = 'height=' + a_int_windowHeight + ',width=' + a_int_windowWidth + ',top=' + int_windowTop + ',left=' + int_windowLeft + ',scrollbars=' + a_bool_scrollbars + ',resizable=' + a_bool_resizable + ',menubar=' + a_bool_menubar + ',toolbar=' + a_bool_toolbar + ',location=' + a_bool_addressbar + ',statusbar=' + a_bool_statusbar + ',fullscreen=' + a_bool_fullscreen + '';
  var obj_window = window.open(a_str_windowURL, a_str_windowName, str_windowProperties)
    if (parseInt(navigator.appVersion) >= 4) {
      obj_window.window.focus();
    }
}