function startRequest(ckey){delete xmlHttp;createXMLHttpRequest();var url="http://mycatalogues.com/cgi2/mc.favman_i.cgi?c="+ckey+"&r="+Math.random()*Date.parse(new Date());if(!xmlHttp){url=url+'&pp=1';popup(url,"resizable=no,toolbar=no,scrollbars=no,location=no,menubar=no,resizable=0,width=350,height=200,statusbar=yes","350","200");return false;}else{xmlHttp.onreadystatechange=handleStateChange;xmlHttp.open("GET",url,true);xmlHttp.send(null);}}function handleStateChange(){if(xmlHttp.readyState==4){if(xmlHttp.status==200){list_favs();}else{alert("Ooops! An error seems to have occured:: Error Code:"+xmlHttp.status);}}}function list_favs(){var xmlDoc=xmlHttp.responseXML;var msgs=xmlDoc.getElementsByTagName("message");var cats=xmlDoc.getElementsByTagName("cat");outputList(msgs,cats);}function outputList(msgs,cats){var html='',msg='',url='';var ending="</a> &nbsp;&#149;",begin="<a href=\"";var currentCat=null,currentMsg=null;currentMsg=msgs[0];if((currentMsg!==null)&&(currentMsg.childNodes[0]!==null)){msg=currentMsg.childNodes[0].nodeValue;}for(var i=0;i<cats.length;i++){if(html>''){html=html+"<br />";}currentCat=cats[i];url=currentCat.childNodes[1].childNodes[0].nodeValue;url=unescape(url);html=html+begin+url+'">';html=html+currentCat.childNodes[0].childNodes[0].nodeValue+ending;}if(msg>''){document.getElementById('msgbox').innerHTML=' &nbsp;'+msg.substring(5);if(document.getElementById("div_tellfriend")!==null){document.getElementById('div_tellfriend').style.display='none';}if(document.getElementById("show_tellfriendlink")!==null){document.getElementById('show_tellfriendlink').style.display='';}if(msg.substr(0,4)=='PASS'){document.getElementById('msgbox').style.background='#b3a278';}else if(msg.substr(0,4)=='FAIL'){document.getElementById('msgbox').style.background='#f2837c';}toggle('msgbox');}if(html>''){document.getElementById('myfavlist').innerHTML=html;}}