﻿function CheckSpecialN(ctlid,e){var ctl=document.getElementById(ctlid).value;var k=(e.which)?e.which:e.keyCode;if(ctl==""){if(k==32)return false;}}var XmlHttpCompany;function CreateXmlHttpCompany(){try{XmlHttpCompany=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{XmlHttpCompany=new ActiveXObject("Microsoft.XMLHTTP");}catch(oc){XmlHttpCompany=null;}}if(!XmlHttpCompany&&typeof XmlHttpCompany!="undefined"){XmlHttpCompany=new XMLHttpRequest();}}function ShowImageN(id){}function callCompanyN(id,e,id1){var k=(e.which)?e.which:e.keyCode;if(k==0){var LB=document.getElementById("LpCompany");var w=LB.length;LB.focus();}else{document.getElementById("imgajax").src=HostAddressInJSfileForPages+"/App_Themes/images/autocomplete_spinne.gif";CreateXmlHttpCompany();var requestUrl;requestUrl=HostAddressInJSfileForPages+"/LiveMarket/AjaxCompany.aspx?time="+new Date().getTime()+"&Compname="+id;}if(XmlHttpCompany){XmlHttpCompany.onreadystatechange=function(){SendMessageReasponseN(id1)};XmlHttpCompany.open("GET",requestUrl,true);XmlHttpCompany.send(null);}}var txtxid;function SendMessageReasponseN(id1){txtxid=id1;if(XmlHttpCompany.readyState==4){if(XmlHttpCompany.status==200){var Data=XmlHttpCompany.responseText;var StartIndex=Data.indexOf('<div>');var LastIndex=Data.lastIndexOf("</form>");var MainData=Data.substring(StartIndex,LastIndex);document.getElementById("divSearch").innerHTML=MainData;document.getElementById("divSearch").style.display="inline";document.getElementById("imgajax").src=HostAddressInJSfileForPages+"/App_Themes/images/white.gif";document.getElementById(id1).focus();}}}function setvalueN(value,id,name){document.getElementById(txtxid).value=name;document.getElementById("divSearch").style.display="none";}function HideDivN(id){document.getElementById(id).style.display="none";}function FillN(ID,Name){if(document.getElementById(ID).value==""){if(Name=='C'){document.getElementById(ID).value="Company Name";}}}function RemoveN(ID){if(document.getElementById(ID).value=="Company Name"||document.getElementById(ID).value=="Change Company"){document.getElementById(ID).value="";document.getElementById(ID).focus();}}var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all
function jumptoie5N(e){var firingobj=ie5?event.srcElement:e.target
if(ie5||ns6){document.onclick=hidemenuie5N}}function hidemenuie5N(e){var firingobj=ie5?event.srcElement:e.target
if(firingobj.tagName=="TD"){document.getElementById("divSearch").style.display="none";}}function isTabN(e){var k=(e.which)?e.which:e.keyCode;if(k==40){var LB=document.getElementById("LpCompany");var w=LB.length;LB.focus();}}function setfocusN(){document.getElementById("divSearch").focus();}function if_tabN(value,id,name,key_val){var k=(key_val.which)?key_val.which:key_val.keyCode;if(k==9){setvalue(value,id,name);}}function QuoteEnterScriptN(e){if(e.keyCode==13){var Scripid=document.getElementById("btnGo");Scripid.click();}}function SearchemptyN(){if(document.getElementById("ctl00_ContentPlaceHolder1_FillCompany1_txtCompany").value=="Company Name"){document.getElementById("ctl00_ContentPlaceHolder1_FillCompany1_txtCompany").value="";}}function SearchfillN(){var getquote=document.getElementById("ctl00_ContentPlaceHolder1_FillCompany1_txtCompany").value;if(getquote==""){document.getElementById("ctl00_ContentPlaceHolder1_FillCompany1_txtCompany").value="Company Name";}}function SearchCompany_Inner(id){var SearchTxt=document.getElementById("ctl00_ContentPlaceHolder1_txtCompany");if(SearchTxt==null)SearchTxt=document.getElementById("CompanyTracker1_txtCompany");if(SearchTxt.value==""||SearchTxt.value=="Company Name"){alert("Please enter company name ..!!!");SearchTxt.value="";SearchTxt.focus();return false;}else{var strUrl=HostAddressInJSfileForPages+"/CompanyProfile/CompanyList.aspx?SrchQuote="+SearchTxt.value+"&id="+id;var newWindow=window.open(strUrl,'_self');newWindow.focus();return false;}return true;}function SearchCompany_Outer(){var SearchTxt=document.getElementById("ctl00_ContentPlaceHolder1_txtCompany");var id=document.getElementById("ctl00_ContentPlaceHolder1_QuoteFinder");if(SearchTxt==null)SearchTxt=document.getElementById("CompanyTracker1_txtCompany");if(SearchTxt.value==""||SearchTxt.value=="Company Name"){alert("Please enter company name ..!!!");SearchTxt.value="";SearchTxt.focus();return false;}else{var strUrl=HostAddressInJSfileForPages+"/CompanyProfile/CompanyList.aspx?SrchQuote="+SearchTxt.value+"&id="+id.value;var newWindow=window.open(strUrl,'_self');newWindow.focus();return false;}return true;}
