﻿function showPopUp(){var $a="<div style='width:400px'><img src='images/IpodAd.gif' style='width:400px;height:426px;'>";$a+="       <div style='float:right;padding-left:5px;'>Don't show this message next time</div><div style='float:right;'><input style='padding-top:5px;' id='doNotShow' type='checkbox' /></div>";$a+="       <div style='float:right;clear:right;padding-top:2px;'><input on type='submit' value='&nbsp;Ok&nbsp;' onclick=hideInfoBox();if($$('doNotShow').checked){setCookie('doNotShowAd',1,100);};></div>";$a+="       <div class='breaker'></div>";$a+="</div>";showInfoBox($a);};function showAll(id){$$("showAllButton"+id).style.display="none";$$("showAll"+id).style.display="block";};function showError($b){var $c="<div style='padding:10px;width:180px;font-weight:bold;'>We couldn't sign you up because "+$b;$c+="<div style='float:right;padding-top:12px;'>"+getButton("Ok","javascript:{hideInfoBox();};",1)+"</div></div>"
showInfoBox($c);};function saveTip($d,$e,$f,to,$g,$h,$i,$j,message){var $k=getXmlhttp();var script="ajaxSaveTip.aspx?nameFirst="+escape($d)+"&nameLast="+escape($e)+"&email="+$f+"&to="+to+"&company="+$g+"&phone="+$h+"&budget="+$i+"&subject="+$j+"&message="+message;$k.open("GET",script,true);$k.onreadystatechange=function(){if($k.readyState==4){if($k.status==200){if($k.responseText=='success'){hideInfoBox();showInfoBox("<b>Thanks for your input.</b><br />");setTimeout("hideInfoBox()",2000);}else{var a="@";var b="nyontap.com";$$("tipMessage").innerHTML="Something went awry.<br>Try to email us instead at: messages"+a+b;}}else{var a="@";var b="nyontap.com";$$("tipMessage").innerHTML="Ack! Something went awry.<br>Try to email us instead at: messages"+a+b;}}};$k.send(null);};function sendTip(){var f=document.forms['tipForm'];var $d=f.nameFirst.value;var $e=f.nameLast.value;var $f=f.email.value;var to=f.concerning.value;var $g=f.company.value;var $h=f.phone.value;var $i=f.budget.value;var $j=f.subject.value;var message=f.message.value;var $c='';if(message==''){$c='Huh? No message?';};if($c==''){saveTip($d,$e,$f,to,$g,$h,$i,$j,message);}else{$$("tipMessage").innerHTML=$c;}};var $l;function showSendTip(){if($$("tipFormDiv").innerHTML!==''){var $m=document.createElement("form");var $n=document.createElement("div");$n.innerHTML=$$("tipFormDiv").innerHTML;$m.appendChild($n);$m.setAttribute("id","tipForm");$m.setAttribute("name","tipForm");$m.setAttribute("method","post");$o=$$("tipFormDiv").innerHTML;var $o=document.createElement("div");$o.appendChild($m);$l=$o.innerHTML;};showInfoBox($l);$$("tipFormDiv").innerHTML='';};function showSubscribe($f){var href="register.asp?email="+$f;var $c=checkEmail($f);if($c){showError($c);}else{var $k=getXmlhttp();$k.open("GET","ajaxCheckNewsletter.aspx?email="+escape($f),true);$k.onreadystatechange=function(){if($k.readyState==4){if($k.status==200){$p=$k.responseText;$q=$p.split("|");if($q.length==1){location.href=href;}else{showError($q[1]);}}else{showInfoBox("There was an unexpected error saving your details.");}}};$k.send(null);}};function checkEmail($r){var $s="";if($r==""){$s="you didn't enter an email address.\n";};if(!(($r.indexOf(".")>2)&&($r.indexOf("@")>0))){$s="you didn't enter a valid email address.\n";}else{var $t=/[\(\)\<\>\,\;\:\\\"\[\]]/;if($r.match($t)){$s="the email address you entered contains illegal characters.\n";}};return $s;};



