/*-*-*-*-*-* This function is used for the localToolbar in the top page *-*-*-*-*-*/ function mhHover(tbl, idx, cls) { var t = document.getElementById(tbl); if (t == null) return; var d = t.getElementsByTagName("TD"); if (d == null) return; if (d.length <= idx) return; d[idx].className = cls; } // This function is used to check if a certain text is numeric or not function IsNumeric(sText) { var ValidChars = "0123456789."; var IsNumber=true; var Char; for (i = 0; i127) { alert("Your email address contains invalid characters."); return false; } } for (i=0; i127) { alert("Your email domain name contains invalid characters."); return false; } } if (user.match(userPat)==null) { alert("Your email address does not seem to be valid - check your spelling, including wrong use of commas, or a full point . at the end of the address!!"); return false; } var IPArray=domain.match(ipDomainPat); if (IPArray!=null) { for (var i=1;i<=4;i++) { if (IPArray[i]>255) { alert("Destination IP address is invalid!"); return false; } } return true; } var atomPat=new RegExp("^" + atom + "$"); var domArr=domain.split("."); var len=domArr.length; for (i=0;i=0 && List1.options[0].value != "-1") { // Add the selected item of List1 in List2 Element = new Option(List1.options[List1.options.selectedIndex].text,List1.options[List1.options.selectedIndex].value, false, true); if (List2.options[0].value != "-1") { List2.add(Element,List1.options[List1.options.selectedIndex].value); //List2.add(Element,List1.length); } else { List2.remove(0); List2.add(Element,0); } // Remove the selected item of List1 List1.remove(List1.options.selectedIndex); Element = new Option("----------------------------------------------","-1"); if (List1.options.length == 0) { List1.add(Element,0); } } } function SwapLists(List1,List2) { if (List1.options.length>0 && List1.options[0].value != "-1") { // Add items of List1 in List2 List2.remove(0); for(i=0;i -1) { parts[d++] = whole.substring(p, q); parts.length = d; p = q + 1; q = whole.indexOf(link, p); } parts[d++] = whole.substring(p); parts.length = d; return(parts); } //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-* function myJoin(parts, link) { if (parts.join) { return(parts.join(link)); } var whole = ""; var thisLink = ""; for(var d = 0; d < parts.length;d++) { if (parts[d] != "") { whole = whole + thisLink + parts[d]; thisLink = link; } } return(whole); } /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* * Search Control *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ function SearchForMaterials() { with (document.form) { if (Trim(txtSearch.value)=="") { return false; } action = "../Home/search_results.php"; submit(); } } /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* * Newsletter Control *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ // This function is used to subscribe a certain email address /* function SubscribeMe() { with (document.form) { var email = txtEmail.value; if (email != "") { if (!isValidMail(email)) { txtEmail.focus(); } else { useraction.value = "subscribe"; action = "../Newsletter/subscribtion.php"; submit(); } }else{ return false; } } } // This function is used to unsubscribe from the newsletter function UnSubscribeMe() { with (document.form) { var email = txtEmail1.value; if (email != "") { if (!isValidMail(email)) { txtEmail1.focus(); } else { useraction.value = "unsubscribe"; action = "../Newsletter/subscribtion.php"; submit(); } }else{ return false; } } } */ /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* * Newsletter Control *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ // This function is used to subscribe (1) or unsubscribe (0) a certain email address function SubscribeMe() { var frm = document.forms[0]; var email = frm.txtSubscriberEmail.value; if (email != "") { if (!isValidMail(email)) { frm.txtSubscriberEmail.focus(); }else{ if (frm.rdNewsletter[0].checked) frm.useraction.value = "subscribe"; else frm.useraction.value = "unsubscribe"; frm.action = "../Newsletter/subscribtion.php"; frm.submit(); } }else{ return false; } } // Contact Us function ContactUs() { with (document.form) { /* if (Trim(txtFirstName.value) == "") { alert("Please you must enter your first name!!!"); txtFirstName.focus(); return false; } if (Trim(txtLastName.value) == "") { alert("Please you must enter your last name!!!"); txtLastName.focus(); return false; } var email = Trim(txtUserEmail.value); if (email != "") { if (!isValidMail(email)) { txtUserEmail.focus(); return false; } } if (Trim(txtSubject.value) == "") { alert("!"); txtSubject.focus(); return false; } */ if (Trim(txtMessage.value) == "") { alert("Please you must enter your message!!!"); txtMessage.focus(); return false; } useraction.value = "SendMail"; submit(); } }