function windowopen(e){var t="directories=no,location=no,width=410,height=450,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no";var n="tellFriend";fileName="/tellfriend.php?url="+e;myWindowHandle=window.open(fileName,n,t);myWindowHandle.focus()}function disabletext(e){return false}function reEnable(){return true}function mischandler(){return false}function mousehandler(e){var t=isNS?e:event;var n=isNS?t.which:t.button;if(n==2||n==3)return false}function Disable_Control_C(e){if(is_ie){var t=String.fromCharCode(event.keyCode).toLowerCase();if(event.ctrlKey&&t=="c"||event.ctrlKey&&t=="a"){event.returnValue=false}}else{var t=String.fromCharCode(e.keyCode).toLowerCase();if(e.ctrlKey&&t=="c"||e.ctrlKey&&t=="a"){document.body.innerHTML="";document.location.reload()}}}function bookmark(){if(document.all)window.external.AddFavorite(document.location,document.title);else if(window.sidebar)window.sidebar.addPanel(document.title,document.location,"")}function makePOSTRequest(e,t,n){http_request=false;if(window.XMLHttpRequest){http_request=new XMLHttpRequest;if(http_request.overrideMimeType){}}else if(window.ActiveXObject){try{http_request=new ActiveXObject("Msxml2.XMLHTTP")}catch(r){try{http_request=new ActiveXObject("Microsoft.XMLHTTP")}catch(r){}}}if(!http_request){alert("Cannot create XMLHTTP instance");return false}if(n=="comnt")http_request.onreadystatechange=comntContents;if(n=="poll")http_request.onreadystatechange=pollContents;if(n=="org")http_request.onreadystatechange=pollContents1;if(n=="bkmrk")http_request.onreadystatechange=bkmrkContents;if(n=="numero")http_request.onreadystatechange=numeroContents;if(n=="rank")http_request.onreadystatechange=rankContents;if(n=="homeajax")http_request.onreadystatechange=homeajax;if(n=="bksites")http_request.onreadystatechange=bksitesf;if(n=="delbmname")http_request.onreadystatechange=updatepage;http_request.open("POST",e,true);http_request.setRequestHeader("Content-type","application/x-www-form-urlencoded");http_request.setRequestHeader("Content-length",t.length);http_request.setRequestHeader("Connection","close");http_request.send(t)}function comntContents(){if(http_request.readyState==4){if(http_request.status==200){document.getElementById("submitted").innerHTML='
'+http_request.responseText+"
"}}}function bksitesf(){if(http_request.readyState==4){if(http_request.status==200){document.getElementById("bksites").innerHTML=""+http_request.responseText+"
"}}}function bkmrkContents(){if(http_request.readyState==4){if(http_request.status==200){alert(http_request.responseText)}}}function addFavorite(e,t,n,r){makePOSTRequest("/addfav.php","name="+e+"01"+t+"01"+n+"01"+r,"bkmrk");document.getElementById("bk125").style.display="none";document.getElementById("bk1256").style.display="block";document.getElementById("bk1256").innerHTML+='Added'}function sendRequest(e,t,n){var r={method:"GET",payload:t,onSuccess:handleResponse};AjaxTCR.comm.sendRequest(e,r)}function handleResponse(e){var t=document.getElementById("srch");t.innerHTML="";var n=e.xhr.responseText.split(",");for(var r=0;r1)t.style.display="block";else t.style.display="none"}function getSuggestions(e){var t="/origin_search.php";var n="origin1="+e.value;sendRequest(t,n)}function checkKey(e,t){var n=document.getElementById("origin1");var r=e&&e.which?e.which:window.event.keyCode;if(r==KEYDOWN||r==KEYUP){var i=gSelectedIndex;if(r==KEYDOWN)i++;else i--;var s=document.getElementById("resultlist"+i);if(s){selectItem(s);n.value=s.innerHTML}}else if(r==ENTER){clearList();var o=removeblank(n.value);jump_origin()}else if(n==t){gSelectedIndex=-1;getSuggestions(t)}}function selectItem(e){var t=document.getElementById("resultlist"+gSelectedIndex);if(t!=null)unselectItem(t);e.className="suggestLinkOver";gSelectedIndex=parseInt(e.id.substring(10))}function unselectItem(e){e.className="suggestLink"}function setCountry(e){document.getElementById("origin1").value=e;var t=removeblank(e);var n=t.toLowerCase();document.location.href="/"+n+"_babynames.html";clearList()}function checkClick(e){var t=e&&e.target||window&&window.event&&window.event.srcElement;var n=t.tagName;if(n.toLowerCase()!="input"&&n.toLowerCase()!="div")clearList()}function clearList(){var e=document.getElementById("srch");e.innerHTML="";e.style.display="none"}function jump_origin(){var e=document.getElementById("origin1").value;if(e==""){alert("Enter Origin Name");e.focus();return false}else{var t="origin1="+e;makePOSTRequest("/origin_search1.php",t,"org")}}function pollContents1(){if(http_request.readyState==4){if(http_request.status==200){result=http_request.responseText;if(result==""){document.getElementById("srch").style.display="none";alert("Requested country/origin not found, Please Try Again! or Click on Appropriate Link")}else{var e=removeblank(result);var t=e.toLowerCase();document.location.href="/"+t+"_babynames.html"}}}}function removeblank(e){var t="";for(var n=0;n');else{var n=document.createElement("iframe");n.id=t;n.name=t}n.style.height="1px";n.style.visibility="hidden";document.body.appendChild(n);var r=function(){AjaxTCR.comm._handleIFrameResponse(e,n)};if(window.attachEvent)n.attachEvent("onload",r);else n.addEventListener("load",r,false);e.serializeForm.target=n.id;e.serializeForm.submit()},_handleIFrameResponse:function(e,t){e.xhr={};e.xhr.responseText=null;e.xhr.status=200;if(t.contentWindow.document.body)e.xhr.responseText=t.contentWindow.document.body.innerHTML;if(t.contentWindow.document.XMLDocument)e.xhr.responseXML=t.contentWindow.document.XMLDocument;else e.xhr.responseXML=t.contentWindow.document;AjaxTCR.comm._handleResponse(e)},_timeoutRequest:function(e){if(e.xhr.readyState!=AjaxTCR.comm.DONE&&e.xhr.readyState!=AjaxTCR.comm.UNSENT){AjaxTCR.comm.abortRequest(e);AjaxTCR.comm.stats._commResults.totalTimeouts++;if(e.retries)AjaxTCR.comm._retryRequest(e);else{if(e.statusIndicator)AjaxTCR.comm._setErrorStatus(e.statusIndicator);e.onTimeout(e);AjaxTCR.comm.queue._checkRequestQueue(e)}}},_progressRequest:function(e){if(!e.abort&&!e.received){e.timespent=Math.round((e.timespent+parseInt(e.progressInterval)/1e3)*1e3)/1e3;e.onProgress(e);clearTimeout(e.progressTimerID);e.progressTimerID=null;e.progressTimerID=window.setTimeout(function(){AjaxTCR.comm._progressRequest(e)},e.progressInterval)}},_retryRequest:function(e){e.retryCount++;if(e.retryCount<=e.retries){if(e.statusIndicator)AjaxTCR.comm._setRetryStatus(e.statusIndicator);AjaxTCR.comm.stats._commResults.totalRetries++;AjaxTCR.comm._makeRequest(e);e.onRetry(e)}else{if(e.statusIndicator)AjaxTCR.comm._setErrorStatus(e.statusIndicator);e.onTimeout(e);AjaxTCR.comm.queue._checkRequestQueue(e)}},_handleResponse:function(e){e.endTime=(new Date).getTime();e.received=true;if(e.timeoutTimerID){clearTimeout(e.timeoutTimerID);e.timeoutTimerID=null}if(e.progressTimerID){clearTimeout(e.progressTimerID);e.progressTimerID=null}AjaxTCR.comm._requestsOutstanding--;if(!e.fromCache&&e.cacheResponse&&e.xhr.status==200&&!e.fail)AjaxTCR.comm.cache.add(e.cacheKey,e.xhr.responseText);if(e.statusIndicator){AjaxTCR.comm._removeProgressStatus(e.statusIndicator);AjaxTCR.comm._removeRetryStatus(e.statusIndicator)}if(e.enforceOrder)AjaxTCR.comm.queue._handleQueue(e);else AjaxTCR.comm._handleCallbacks(e);AjaxTCR.comm.queue._checkRequestQueue(e)},_handleCallbacks:function(e){try{e.httpStatus=e.xhr.status;e.httpStatusText=e.xhr.statusText}catch(t){e.httpStatus=3507;e.httpStatusText="Unknown Loss"}e.inProgress=false;if(e.outputTarget&&e.useRaw){var n=e.outputTarget;if(n&&typeof n=="string")n=document.getElementById(n);if(e.fail)n.innerHTML=e.fail;else n.innerHTML=e.xhr.responseText}if(e["on"+e.httpStatus])e["on"+e.httpStatus](e);if(e.retries){for(var r=0;r=AjaxTCR.comm.cache._cacheOptions.size){var n=AjaxTCR.comm.cache._cacheOptions.algorithm;if(n=="FIFO")AjaxTCR.comm.cache._cache.splice(0,1);else if(n=="LFU"){var r=-1;for(var i=0;iAjaxTCR.comm.cache._cache[i].totalAccessed)r=i}AjaxTCR.comm.cache._cache.splice(r,1)}else if(n=="LRU"){var r=-1;for(var i=0;iAjaxTCR.comm.cache._cache[i].lastAccessed)r=i}AjaxTCR.comm.cache._cache.splice(r,1)}}var s=AjaxTCR.comm.cache._createCacheItem(e,t);AjaxTCR.comm.cache._cache.push(s)},clear:function(){AjaxTCR.comm.cache._cache=new Array},get:function(e){var t=null;for(var n=0;nr){AjaxTCR.comm.cache.remove(item.key);t=null}}}if(t)return t.value;else return null},getAll:function(){return AjaxTCR.comm.cache._cache},getSize:function(){return AjaxTCR.comm.cache._cache.length},remove:function(e){for(var t=0;t=AjaxTCR.comm.queue.requestQueueConcurrentRequests){var r={url:e,options:t};if(t.priority=="next")AjaxTCR.comm.queue._requestQueue.unshift(r);else if(n&&n=="faster"){var i=false;for(var s=0;s0){var t=AjaxTCR.comm.queue._requestQueue.shift();AjaxTCR.comm.sendRequest(t.url,t.options)}},_handleQueue:function(e){AjaxTCR.comm.queue._responseQueue.queue[e.responseQueueID]=e;while(AjaxTCR.comm.queue._responseQueue.queue[AjaxTCR.comm.queue._responseQueue.currentIndex]!=undefined){AjaxTCR.comm._handleCallbacks(AjaxTCR.comm.queue._responseQueue.queue[AjaxTCR.comm.queue._responseQueue.currentIndex]);AjaxTCR.comm.queue._responseQueue.currentIndex++}}};AjaxTCR.comm.stats={_commResults:{totalRequests:0,totalTimeouts:0,totalRetries:0,totalSuccess:0,totalFails:0,requestFails:new Array},collect:function(e){var t=function(){var t=AjaxTCR.comm.stats.get();if(t.totalRequests>0){var n=AjaxTCR.data.encodeJSON(t);AjaxTCR.comm.sendRequest(e,{method:"POST",payload:n,requestContentType:"application/json",oneway:true})}};if(window.attachEvent)window.attachEvent("onunload",t);else window.addEventListener("unload",t,false)},get:function(){return AjaxTCR.comm.stats._commResults},getRequestCount:function(e){if(e=="queued")return AjaxTCR.comm.queue.getSize();else if(e=="active")return AjaxTCR.comm._requestsOutstanding;else return AjaxTCR.comm.queue.getSize()+AjaxTCR.comm._requestsOutstanding}};var gSelectedIndex=-1;var ENTER=13;var KEYUP=38;var KEYDOWN=40;var ONCLICK=47;var fileref=""