﻿/* Popup.js */
var intNameID=0;function openChild(url,width,height)
{leftC=(screen.width-width)/2;topC=(screen.height-height)/2;intNameID=intNameID+1;var x1=window.open(url,'x_'+intNameID,"width="+width+", height="+height+",top="+topC+",left="+leftC+",location=no, menubar=no, status=no, toolbar=no, scrollbars=0,resizable=no");}
function openChildScroll(url,width,height)
{leftC=(screen.width-width)/2;topC=(screen.height-height)/2;window.open(url,null,"width="+width+", height="+height+",top="+topC+",left="+leftC+",location=no, menubar=no, status=no, toolbar=no, scrollbars=1,resizable=no");}
function openNewWindow(url)
{leftC=(screen.width-570)/2;topC=(screen.height-440)/2;window.open(url,null,"width=570px, height=440px,top="+topC+",left="+leftC+", location=no, menubar=no, status=no, toolbar=no, scrollbars=1,resizable=no");}
function openChildForPublishHTML(url,width,height)
{leftC=(screen.width-width)/2;topC=(screen.height-height)/2;intNameID=intNameID+1;var x1=window.open(url,'x_'+intNameID,"width="+width+", height="+height+",top="+topC+",left="+leftC+",location=yes, menubar=yes, status=yes, toolbar=yes, scrollbars=1,resizable=yes");}
/* ShAjaxJS.js */
var strLoding="<b><center><img alt='Loading' title='Loading' src='App_Themes/en/images/ajax-loader.gif' />Loading...</center><b/>";var objCompleted=null;function GetXmlHttpObject(){var xmlHttp=null;try
{xmlHttp=new XMLHttpRequest();}catch(e){try
{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}return xmlHttp;}function DoAjax(url,statusId,divLoadingId){var xmlHttp;xmlHttp=GetXmlHttpObject();if(xmlHttp==null){alert("Your browser does not support AJAX!");return;}xmlHttp.onreadystatechange=function stateChanged(){var strLodingTemp="";strLodingTemp=strLoding;switch(xmlHttp.readyState){case 0:case 1:case 2:case 3:if(document.getElementById(divLoadingId)!=null)document.getElementById(divLoadingId).innerHTML=strLodingTemp;break;case 4:if(document.getElementById(statusId)!=null)document.getElementById(statusId).innerHTML=xmlHttp.responseText;if(objCompleted!=null){objCompleted.complete(xmlHttp.responseText);}};};xmlHttp.open("GET",url,true);xmlHttp.send(null);}function TestShAjax(siteURL,divResultID,obj_Completed,divLoadingId){this.objCompleted=obj_Completed
DoAjax(siteURL,divResultID,divLoadingId);}function removeBadChar(strTemp){strTemp=strTemp.replace("--","");strTemp=strTemp.replace("|","");strTemp=strTemp.replace("<script>","&lt;script&gt;");strTemp=strTemp.replace("</","&lt;&frasl;");strTemp=strTemp.replace("/","&frasl;");strTemp=strTemp.replace(">","&gt;");strTemp=strTemp.replace("<","&lt;");return strTemp;}function newsLetterURL(strValue){var strTemp=document.getElementById(strValue).value;if(strTemp==""){alert('Enter a Valid E-mail Address! ');return false;}else
{strTemp=removeBadChar(strTemp);checkEmail(strTemp);}}function checkEmail(EmailValue){if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(EmailValue)){goToNewsLetter(EmailValue);}else{alert("Invalid E-mail Address! Please re-enter.");return false;}}
/* SearchAjax.js */
function CheckSearch(objText,strSearchTerm,strSearchMessage){var strTemp=removeBadChar(objText.value);if(strTemp.length<3||strTemp==strSearchTerm){alert(strSearchMessage);return false;}else
{window.location.href="search.aspx?keywords="+encodeURIComponent(removeBadChar(objText.value));}}function CheckEnterKey(e,obj,strSearchTerm,strSearchMessage){var characterCode
if(e&&e.which){e=e
characterCode=e.which}else{e=event
characterCode=e.keyCode}if(characterCode==13){CheckSearch(obj,strSearchTerm,strSearchMessage);return false;}else{return true;}}
