// JavaScript Document

			function changeImage(sName,sPic)
			{
				v = "document.images['"+ sName +"'].src= '../images/"+ sPic +" '";
				eval(v);
				return true;
			}
			function changeImageBack(sName,sPic)
			{
				v = "document.images['"+ sName +"'].src= '../images/"+ sPic +" ' ";
				eval(v);
 			//	document.images["aboutus"].src = "../images/m_Aboutus.gif";
 				return true;
			}

            function getUrl(sUrl){
                if (sUrl == ""){
                    form1.selURL.focus(); 
                    return false;
                }
               else{ 
                src = sUrl;
                 winstyle="";
                //winstyle = "status=yes,toolbar=yes,menubar=yes,location=yes,scrollbars=yes,top=0,left=0";
                window.open (src,null,winstyle);  
               } 
               
            }
            function shwImage(sId){
                src = "./showImage.aspx?Id="+ sId;
                winstyle = "width=300,height=200,status=yes,toolbar=no,menubar=no,location=no,scrollbars=no,top=0,left=0";
                window.open (src,null,winstyle); 
            }
            
               function chkFrm(){
               var submit = false;
               if (document.getElementById("txtName").value == ""){
                    alert("Please Fill in Name - Surname");
                    document.getElementById("txtName").focus();
               } 
               else if(document.getElementById("txtEmail").value == ""){
                    alert("Please Fill in Email");
                    document.getElementById("txtEmail").focus();
                }
               else if(echeck(document.getElementById("txtEmail").value) == "a") {
                    alert("Please Fill Text in Email Format");
                    document.getElementById("txtEmail").value = "";
                    document.getElementById("txtEmail").focus();
               }
                else if(document.getElementById("txtComment").value == ""){
                    alert("Please Fill in Comment");
                    document.getElementById("txtComment").focus();
                }
               
               else{
                    submit = true;
               } 
               if (submit == true){
                document.forms["form1"].action = "SendMail.aspx";
                document.forms["form1"].submit(); 
               } 
            }
      
            function echeck(str) {
            var at="@"
            var dot="."
            var lat=str.indexOf(at)
            var lstr=str.length
            var ldot=str.indexOf(dot)
            var a = "a";
            var b = "b";
            if (str.indexOf(at)==-1){
                return (a);
            }
            if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
                return (a)
            }

            if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
                return (a)
            }
            if (str.indexOf(at,(lat+1))!=-1){
                 return (a)
            }
            if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
                 return (a)
            }
            if (str.indexOf(dot,(lat+2))==-1){
                 return (a)
            }
            if (str.indexOf(" ")!=-1){
                 return (a)
            }
            return (b)
            }

