function check() {
form2.UserID.value=form1.UserID.value;
window.open('','UserID', 'toolbar=0,  titlebar = 0, status=0, scrollbars=0, menubar=0, resizable=0, width =360, height=250,left=220,top=175');
document.form2.submit();
}

function send2mem(m) {
window.open('?send2member=1&id='+m ,'s2m', 'toolbar=0,  titlebar = 0, status=0, scrollbars=0, menubar=0, resizable=0, width=400, height=297,left=0,top=0');
}

function show(id) 
{ 
			hide();
			if (id == 'pc_training')
			{
				document.getElementById('pc_training').style.display="";
				document.getElementById('pc_training1').style.display="";
				document.getElementById('pc_training2').style.display="";
				
					var hideSubjects =new Array("pc_skills","pc_skills1","pc_skills2")
				
					for (i=0;i<hideSubjects.length;i++)
					{
						if (document.getElementById(hideSubjects[i])!==null) 
						{
							document.getElementById(hideSubjects[i]).style.display="none";
						} 
					}
			}
			
			if (id == 'he_training')
			{
				document.getElementById('he_training').style.display="";
				document.getElementById('he_training1').style.display="";
				document.getElementById('he_training2').style.display="";
				
				document.getElementById('pc_skills').style.display="";
				document.getElementById('pc_skills1').style.display="";
				document.getElementById('pc_skills2').style.display="";
			}
}

function hide() 
{ 
	var hideSubjects =new Array("pc_training","pc_training1","pc_training2","he_training","he_training1","he_training2")

	for (i=0;i<hideSubjects.length;i++)
	{
		if (document.getElementById(hideSubjects[i])!==null) 
		{
			document.getElementById(hideSubjects[i]).style.display="none";
		} 
	}
	
	var showSubjects =new Array("pc_skills","pc_skills1","pc_skills2")

	for (i=0;i<showSubjects.length;i++)
	{
		if (document.getElementById(showSubjects[i])!==null) 
		{
			document.getElementById(showSubjects[i]).style.display="";
		} 
	}
}
function show1(id) 
{
	if (id == 'tutor_transport')
	{
		document.getElementById('tutor_transport').style.display="";
		document.getElementById('tutor_transport1').style.display="";
	}
}
function hide1(id) 
{ 
		if (id=='tutor_transport')
		{
		document.getElementById('tutor_transport').style.display="none";
		document.getElementById('tutor_transport1').style.display="none";
		}
}
<!-- for addSubActivitis -->

function showAddSub(id) 
{ 
			hide();
			if (id == 'pc_training')
			{
				document.getElementById('pc_training').style.display="";
				document.getElementById('pc_training1').style.display="";
				document.getElementById('pc_training2').style.display="";
			}
			
			if (id == 'he_training')
			{
				document.getElementById('he_training').style.display="";
				document.getElementById('he_training1').style.display="";
				document.getElementById('he_training2').style.display="";
			}

}

<!-- numbers only -->
function numbs(name)
{
var a = document.getElementById(name);
a.value= a.value.replace(/[^0-9]/g, '');
}

<!-- alphabets + numbers only -->
function alfanum(name)
{
var a = document.getElementById(name);
a.value= a.value.replace(/[^a-z0-9 _-]/ig, '');
}


<!-- bilingual alphabetics  only -->
function alphabs(name)
{
var a = document.getElementById(name);

<!-- not allowed:  special characters, numbers, '-' and '_'  -->
<!--  allowed:  '.' , '/'  -->
exclude_name = /\$|,|@|#|~|`|\%|\*|\^|\&|\(|\)|\+|\=|\[|\-|\_|\]|\[|\}|\{|\;|\:|\'|\"|\<|\>|\?|\||\!|\$/g;

a.value= a.value.replace(/[\0-9]/g, '')	
				.replace(exclude_name, "") ;
}

<!-- user id -->
function user(name)
{
var a = document.getElementById(name);

	<!-- prevent numbers  , space,  '-' and '_' as first character note the charAt  and charCodeAt  -->
	if (a.value.charAt(0)<=9 || a.value.charCodeAt(0)==32 || a.value.charAt(0)=='-' || a.value.charAt(0)=='_')
		{
			a.value = a.value.replace(/^[ 0-9_-]{1,}/g, '');
		}

	<!-- prevent spaces, special characters AND consecutive '-' and '_' -->
	a.value = a.value.replace(/[^a-zA-Z0-9_-]/ig, '')
		.replace(/_-{1,}/g, '_')
		.replace(/-_{1,}/g, '-')
		.replace(/ -{1,}/g, '-')
		.replace(/- {1,}/g, '-')
		.replace(/ _{1,}/g, '_')
		.replace(/_ {1,}/g, '_') 
		.replace(/__{1,}/g, '_')
		.replace(/--{1,}/g, '-')
		
	<!-- to prevent last character being space, '-' or '_' -->
	var end = a.value.length;
	if (a.value.charCodeAt(end-1)==32 || a.value.charAt(end-1)=='-' || a.value.charAt(end-1)=='_')
	{
		a.value = a.value.replace(/[ _-]{1,}$/g, '');
	}
}

<!-- name -->
function namet(name)
{
var a = document.getElementById(name);

<!-- prevent special characters, numbers AND consecutive '-' and '_' -->
<!-- allow '.' -->
exclude_name = /\$|,|@|#|~|`|\%|\*|\^|\&|\(|\)|\+|\=|\[|\-|\_|\]|\[|\}|\{|\;|\:|\'|\"|\<|\>|\?|\||\!|\$/g;

a.value= a.value.replace(/[0-9]/g, '')
	.replace(exclude_name, "") ;
}

function passw(name)
{
var a = document.getElementById(name);

exclude = /\$|,|@|#|~|`|\%|\*|\^|\&|\(|\)|\+|\=|\[|\-|\_|\]|\[|\}|\{|\;|\:|\'|\"|\<|\>|\?|\||\\|\!|\$|\.|\//g;
a.value= a.value.replace(/[^a-z0-9_-]/ig, '')
	.replace(exclude, "");
}

<!-- for  answer : bilingual alphanumeric accepted-->
function alfanum(name)
{
var a = document.getElementById(name);

exclude = /\$|,|@|#|~|`|\%|\*|\^|\&|\(|\)|\+|\=|\[|\-|\_|\]|\[|\}|\{|\;|\:|\'|\"|\<|\>|\?|\||\\|\!|\$|\.|\//g;
a.value= a.value.replace(exclude, "") ;
}

function email(name) 
{
var a = document.getElementById(name);
a.value= a.value.replace(/[^a-z0-9@_.-]/ig, '');
}
<!-- News section -->

<!-- Ticker startup -->
function startNews()
{
	theCurrentHeadline     = -1;
	theCurrentLength    = 0;

	if (document.getElementById) {	
		    theAnchorObject     = document.getElementById("newsAnchor");
			runTheNews()   	
		 }
}

function runTheNews()
{
	var myTimeout;  

	if(theCurrentLength == 0)
	{
		theCurrentHeadline++;
		theCurrentHeadline      = theCurrentHeadline % HeadlinesCount;
		theStorySummary      = Headlines[theCurrentHeadline].replace(/&quot;/g,'"');		
		theTargetLink        = Links[theCurrentHeadline];
		theAnchorObject.href = theTargetLink;
		thePrefix 	    	 = "";
	}

	theAnchorObject.innerHTML = thePrefix + 
	theStorySummary.substring(0,theCurrentLength);

	if(theCurrentLength != theStorySummary.length)
	{
		theCurrentLength++;
		myTimeout = theCharacterTimeout;
	}
	else
	{
		theCurrentLength = 0;
		myTimeout = theStoryTimeout;
	}

	setTimeout("runTheNews()", myTimeout);
}

	var theCharacterTimeout = 40;
	var theStoryTimeout     = 3000;

	var Headlines = new Array();
	var Links = new Array();
<!--  END of News section -->


<!--  jadeed section -->
function pausescroller(content, divId, divClass, delay){

this.content=content
this.tickerid=divId
this.delay=delay
this.mouseoverBol=0
this.hiddendivpointer=1
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="new" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="new" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener)
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent)
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById)
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) 
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) 
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) 
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}