function GetHttpObject(){if(window.XMLHttpRequest){try{return new XMLHttpRequest();}catch(e){}}else if(window.ActiveXObject){try{return new ActiveXObject('Msxml2.XMLHTTP');}catch(e){}
try{return new ActiveXObject('Microsoft.XMLHTTP');}catch(e){}}
return null;}
function addComment(){var AddComment=new CallBackObject("POST");AddComment.OnError=AddComment_OnError;AddComment.OnComplete=AddComment_Get;var txt=$('textareacomment');var tx=escapeURI(txt.value);var URL="/catalog/AddComment.aspx";var Query='Login='+$('Login').value+'&';Query+='Email='+$('Email').value+'&';Query+='Host='+$('HostAddr').value+'&';Query+='Text='+tx+'&';Query+='CtId='+$('CtId').value+'&';Query+='CnId='+$('CnId').value+'&';Query+='Brand='+$('Brand').value+'&';Query+='Pid='+$('Pid').value+'&';Query+='HotelName='+escapeURI($('HotelName').value)+'&';Query+='Ozenka='+$('Ozenka').value+'&';Query+='Code='+$('c').value;AddComment.DoCallBack(URL,Query);return true;}
function AddComment_OnError(status,statusText,responseText){alert("OnError: "+status+"\r"+statusText+"\r"+responseText);}
function AddComment_Get(responseText,responseXML){var code=String(responseText).toLowerCase()
if(code=="add")
{$('Login').value="";$('Email').value="";$('textareacomment').value="";$('Ozenka').selectedIndex=0;}
else if(code=="mail")$('Email').focus();else if(code=="code")$('c').focus();$('c').value="";document.forms[0].action=$("RewriteURL").value;document.forms[0].submit();}
function escapeURI(La){if(encodeURIComponent)return encodeURIComponent(La);if(escape)return escape(La)}
