<!--
// JavaScript

//---------- Start of Title ----------//
function mainTitleEng() {
	document.title="St. Francis' Institution";
}
function contentTitleEng() {
	document.title="Content";
}
function mainTitleMal() {
	document.title="S.M.K. St. Francis' Institution";
}
function contentTitleMal() {
	document.title="Kandungan";
}
//---------- End of Title ----------//

//---------- Start of Sliding Status Message Effect ----------//
function slide(jumpSpaces,position) {
  var msg = "--= Welcome to St. Francis' Institution Website =--"
  var out = ""
  if (endScroll) {return false}
  for (var i=0; i<position; i++) 
    {out += msg.charAt(i)}
  for (i=1;i<jumpSpaces;i++) 
    {out += " "}
  out += msg.charAt(position)
  window.status = out
  if (jumpSpaces <= 1) {
    position++
    if (msg.charAt(position) == ' ') 
      {position++ }
    jumpSpaces = 100-position
  } else if (jumpSpaces >  3)
       {jumpSpaces *= .75}
  else
    {jumpSpaces--}
  if (position != msg.length) {
    var cmd = "slide(" + jumpSpaces + "," + position + ")";
    scrollID = window.setTimeout(cmd,5);
  } else {
    scrolling = false
    return false 
  }
  return true
}
function ccSetup() {
 if (scrolling) 
  if (!confirm('Re-initialize slide?'))
   return false 
   endScroll = true 
   scrolling = true 
   var killID = window.setTimeout('endScroll=false',6)
   scrollID = window.setTimeout('slide(100,0)',10)
   return true 
}
var scrollID = Object
var scrolling = false
var endScroll = false
//---------- End of Sliding Status Message Effect ----------//

//---------- Start of Breakout ----------//
function breakOut() {
	if (window.top == window.self) {
		window.self.location = "index.php";
	}
}
//---------- End of Breakout ----------//

//---------- Start of Show Status Message ----------//
function showStatusMsg(message) {
	window.status=message;
}
function hideStatusMsg() {
	window.status=" ";
}
//---------- End of Show Status Message ----------//

//---------- Start of PopUp Image Effect ----------//
function popUpImg(location,top,left) {
document.getElementById('image').src=location;
document.image.style.top=top;
document.image.style.left=left;
document.image.style.visibility="visible";
}
function hideImg() {
document.getElementById('image').src="";
document.image.style.visibility="hidden";
}
//---------- End of PopUp Image Effect ----------//

//---------- Start of Show Sub Effect ----------//
function showSub(txt) {
	if (document.getElementById('sub').innerHTML==txt) {
		document.getElementById('sub').innerHTML="Please use the links above to navigate the site."
	}
	else {
		document.getElementById('sub').innerHTML=txt;
	}
}
//---------- End of Show Sub Effect ----------//

//---------- Start of Verification Check ----------//
function validate() {
	x = document.webmail
	at = x.Email.value.indexOf("@")
	name = x.Name.value
	comments = x.Comments.value
	submitOK = "True"

if (name == "") {
	alert("Please enter your name.")
	submitOK = "False"
	}

if (at == -1) {
 	alert("Please enter a valid E-Mail.")
 	submitOK = "False"
	}

if (comments == "") {
 	alert("Please type your message.")
 	submitOK = "False"
	}

if (submitOK == "False") {
 	return false
	}
}
//---------- End of Verification Check ----------//

//-->