// JavaScript Document
function JavaWin() {
	var win='';
  	var leftpos = screen.availWidth - 220;
    var webhost = 'http://java.chikka.com/ctm_java/';
        is_resizable = (navigator.appName=="Netscape") ? 0 : 0;
		
if (!win.closed && win.location) {
		win.location.href = webhost + 'ctmCompatibility.php';
	}
	else {
		 win = window.open( webhost + 'ctmCompatibility.php', 'JavaLite', 'status=yes,location=no, menubar=no, left = ' + leftpos + ', top = 20, width= 170, height=465, scrollbars=no, resizable=' + is_resizable);
		if (!win.opener) win.opener = self;
	}      
       
}

function Iscroll_()
	{}

function Iscroll_Stop()
	{
//document.getElementById(iframeId).contentWindow


	}
	
function SatUpd(topop){
	var sain = 'weather_sat.php?d='+topop
	var para= 'scrollbars=true,resizable=true,toolbar=false,menu=false'
	window.open('kb_pop/'+ sain,'Kabalikat_Bicol_Weather_Update',para)
}

	function wmqStop()
		{
	document.getelementsbyid('wmq').behavior=''
			}
			
var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i

				function chkmail(e){				
				var returnval=emailfilter.test(e.value)
				if (returnval==false){					
					document.getElementById('postnow').style.display = 'none';
					document.getElementById('msg').innerHTML='ALERT: Please enter valid email address to validate your entry.';
					document.getElementById('msg').style.display=''
					//e.focus();
								
				}
					else
				{
				document.getElementById('postnow').style.display = '';	
				document.getElementById('msg').innerHTML=''
				}
				return returnval
			}
				
function chkname(x,y){if (x.value==""){alert (y+" field is required, dont leave it blank.");set_focus(x)}}
					
					function checkme(x,y)
				{
					if (x.value==""){
						document.getElementById('msg').innerHTML= y+" field is required, dont leave it blank."
						document.getElementById('msg').style.display=''
						}
						else{
						document.getElementById('msg').innerHTML=''
						document.getElementById('msg').style.display='none'
						}
					}
					
				function checkmem(i)
					{
					if(i==1001)
						{
						document.regform.specialization.options[0].selected=true
						document.getElementById('spcbox').style.display='none'
						}
					else
						{
							document.getElementById('spcbox').style.display=''
							}

						}

function set_focus(element)
	{
		try{
			setTimeout(element.focus(),100)
		}
			catch(err)
			{
			setTimeout(element.select(),100)
			}
			}
			
function goChapter(element)
	{
		window.location='/chapter/'+element.value;
		return false;
		}
function goAOR(element)
	{
		window.location='/AOR/'+element.value;
		return false;
		}
