var gr8_contactsmsform_htm='<form action=http://www.gr8stuff.co.za/contactsms.asp method=POST name=smsresform><input type=hidden name=ref value><div align=center><center><table border=1 cellpadding=0 cellspacing=0 width=300><tr><td><div align=center><center><table border=0 cellpadding=2 width=100%><tr><td align=center colspan=2><font face=arial><B><u>Get Our Contact Details SMS|^d to you</u></B><B><br> </B></font><font size=1 face=arial>Complete the form below and click the<B> REQUEST DETAILS</B> button.</font></td></tr><tr><td><font size=2 face=arial>Your Name:<br> <input type=text size=20 name=name style="FONT-SIZE: 9pt" onkeypress="if(!isNS4){if (!((event.keyCode&gt;64 &amp;&amp; event.keyCode&lt;91) || (event.keyCode==45) || (event.keyCode==32) || (event.keyCode==39) || (event.keyCode&gt;96 &amp;&amp; event.keyCode &lt; 123))) event.returnValue = false;}else{if (!((event.which&gt;64 &amp;&amp; event.which&lt;91) || (event.which==45) || (event.which==32) || (event.which==39) || (event.which&gt;96 &amp;&amp; event.which&lt;123))) event.returnValue = false;}" onkeydown="if(!isNS4){if(event.keyCode == 13) {document.smsresform.cellno.focus(); event.returnValue = false;}}else{if(event.which == 13) {document.smsresform.cellno.focus(); returnfalse;}}"><br> Cell Phone Number:<br> <input type=text size=20 maxlength=10 name=cellno style="FONT-SIZE: 9pt" onkeypress="if(!isNS4){if(event.keyCode &lt; 48 || event.keyCode &gt; 57) event.returnValue = false;}else{if(event.which &lt; 48 || event.which &gt; 57) returnfalse;}" onkeydown="if(!isNS4){if(event.keyCode == 13) {document.smsresform.butsend.focus(); event.returnValue = false;}}else{if(event.which == 13) {document.smsresform.butsend.focus(); returnfalse;}}"></font></td><td valign=bottom><p align=center><font face=arial><input type=button name=butsend value="Request Details" onclick=smsverify();></font></p></td></tr></table></center></div><div align=center><center><table border=0 cellpadding=2 width=100%><tr><td width=100%><font size=1 face=arial><b><u>Note</u></b><b>:</b> Our contact details will be SMS|^d to your cell phone instantly when you click the<B> REQUEST DETAILS</B> button above. This service is only available to South African cell phone users (MTN, Vodacom and Cell-C subscribers).</font></td></tr></table></center></div></td></tr></table></center></div><div align=center><center><table border=0 cellpadding=2 width=100%><tr><td align=center colspan=2><font size=1 face=arial>To go back and rather send us a message click the button below<br> :<input type=button name=butsms value="Go Back" onclick="contactform(|^contactform.htm|^);" style="FONT-SIZE: 9pt"></font></td></tr></table></center></div></form>';
var gr8_contactemailform_htm='<form action=http://gr8stuff.co.za/contactemail.asp method=POST name=emailresform><input type=hidden name=ref value><div align=center><center><table border=1 cellpadding=0 cellspacing=0 width=300><tr><td><div align=center><center><table border=0 cellpadding=2 width=100%><tr><td align=center colspan=2><font face=arial><B><u>Get Our Contact Details eMailed to you</u></B><B><br> </B></font><font size=1 face=arial>Complete the form below and click the<B> REQUEST DETAILS</B> button.</font></td></tr><tr><td><font size=2 face=arial>Your Name:<br> <input type=text size=20 name=name onkeydown="if(!isNS4){if(event.keyCode == 13) {document.emailresform.email.focus(); event.returnValue = false;}}else{if(event.which == 13) {document.emailresform.email.focus(); returnfalse;}}" onkeypress="if(!isNS4){if (!((event.keyCode&gt;64 &amp;&amp; event.keyCode&lt;91) || (event.keyCode==45) || (event.keyCode==32) || (event.keyCode==39) || (event.keyCode&gt;96 &amp;&amp; event.keyCode &lt; 123))) event.returnValue = false;}else{if (!((event.which&gt;64 &amp;&amp; event.which&lt;91) || (event.which==45) || (event.which==32) || (event.which==39) || (event.which&gt;96 &amp;&amp; event.which&lt;123))) event.returnValue = false;}" style="FONT-SIZE: 9pt"><br> eMail Address:<br> <input type=text size=20 name=email style="FONT-SIZE: 9pt" onkeydown="if(!isNS4){if(event.keyCode == 13) {document.emailresform.butsend.focus(); event.returnValue = false;}}else{if(event.which == 13) {document.emailresform.butsend.focus(); returnfalse;}}"></font></td><td valign=bottom><p align=center><input type=button name=butsend value="Request Details" onclick=emailverify();></p></td></tr></table></center></div><div align=center><center><table border=0 cellpadding=2 width=100%><tr><td width=100%><font size=1 face=arial><b><u>Note</u></b><b>:</b> Our contact details will be sent to your email address when you click the<B> REQUEST DETAILS</B> button above.</font></td></tr></table></center></div></td></tr></table></center></div><div align=center><center><table border=0 cellpadding=2 width=100%><tr><td align=center colspan=2><font size=1 face=arial>To go back and rather send us a message click the button below<br> :<input type=button name=butsms value="Go Back" onclick="contactform(|^contactform.htm|^);" style="FONT-SIZE: 9pt"></font></td></tr></table></center></div></form>';
var gr8_contactform_htm='<form action=http://www.gr8stuff.co.za/contactmsg.asp method=POST name=resform><input type=hidden name=ref value><div align=center><center><table frame=below border=1 cellpadding=0 cellspacing=0 width=300><tr><td><div align=center><center><table border=0 cellpadding=2 width=100%><tr><td align=center colspan=2><font face=arial><B><u>Send us an SMS Message</u></B><B><br> </B></font><font size=1 face=arial>Complete the form below and click the<B> SEND</B> button.</font></td></tr><tr><td><font size=2 face=arial>Your Name:<br> <input type=text size=20 name=name style="FONT-SIZE: 9pt" onkeypress="if(!isNS4){if (!((event.keyCode&gt;64 &amp;&amp; event.keyCode&lt;91) || (event.keyCode==45) || (event.keyCode==32) || (event.keyCode==39) || (event.keyCode&gt;96 &amp;&amp; event.keyCode &lt; 123))) event.returnValue = false;}else{if (!((event.which&gt;64 &amp;&amp; event.which&lt;91) || (event.which==45) || (event.which==32) || (event.which==39) || (event.which&gt;96 &amp;&amp; event.which&lt;123))) event.returnValue = false;}" onkeydown="if(!isNS4){if(event.keyCode == 13) {document.resform.cellno.focus(); event.returnValue = false;}}else{if(event.which == 13) {document.resform.cellno.focus(); returnfalse;}}"><br> Cell Phone No:<br> <input type=text size=20 maxlength=10 name=cellno style="FONT-SIZE: 9pt" onkeypress="if(!isNS4){if(event.keyCode &lt; 48 || event.keyCode &gt; 57) event.returnValue = false;}else{if(event.which &lt; 48 || event.which &gt; 57) returnfalse;}" onkeydown="if(!isNS4){if(event.keyCode == 13) {document.resform.email.focus(); event.returnValue = false;}}else{if(event.which == 13) {document.resform.email.focus(); returnfalse;}}"><br> </font><font size=1 face=arial>(South African cell phone users only)</font><p><font size=2 face=arial>eMail Address:<br> <input type=text size=20 name=email style="FONT-SIZE: 9pt" onkeydown="if(!isNS4){if(event.keyCode == 13) {document.resform.msg.focus(); event.returnValue = false;}}else{if(event.which == 13) {document.resform.msg.focus(); returnfalse;}}"></font></p></td><td valign=top><font size=2 face=arial>Your Message:<br> <textarea name="msg" rows="5" cols="20"|~                    onkeydown="textCounter(this.form.msg,this.form.remLen,90);"|~                    onkeyup="textCounter(this.form.msg,this.form.remLen,90);"|~                    style="FONT-SIZE: 9pt"></textarea><br> </font><font size=1 face=arial><input type=text size=3 maxlength=3 name=remLen value=90 readonly style="FONT-SIZE: 1em; border: none; text-align: right"> of 90 chars left</font><p align=center><font face=arial><input type=button name=butsend value=Send onclick=verify();></font></p></td></tr></table></center></div><div align=center><center><table border=0 cellpadding=2 width=100%><tr><td width=100%><font size=1 face=arial><b><u>Note</u></b><b>:</b> Your message will be sent via SMS to our cell phone. South African registered cell phone users will receive an SMS or a phone call in reply, otherwise we will reply via email.</font></td></tr></table></center></div></td></tr></table></center></div><div align=center><center><table border=0 cellpadding=2 width=100%><tr><td align=center colspan=2><font size=1 face=arial>To make direct contact, get our details (tel numbers, email, etc) by clicking one of the options below:</font></td></tr><tr><td align=center valign=top><font size=1 face=arial><input type=button name=butsms value="SMS Details" onclick="contactform(|^contactsmsform.htm|^);" style="FONT-SIZE: 9pt"><br> South African cell phone users</font></td><td align=center valign=top><font size=1 face=arial><input type=button name=butemail value="Email Details" onclick="contactform(|^contactemailform.htm|^);" style="FONT-SIZE: 9pt"><br> International enquiries</font></td></tr></table></center></div></form>';
<!--
function smsverify() {
var cr = String.fromCharCode(13);
var themessage = "Please complete the following fields: " + cr;
if (document.smsresform.name.value=="") {
themessage = themessage + cr + "   Your Name";
}
if (document.smsresform.cellno.value=="") {
themessage = themessage + cr + "   Cell Phone Number";
}
if (themessage == "Please complete the following fields: " + cr) {
var shost=document.location.hostname;
if (shost=='pandanote') document.smsresform.action='http://pandanote:90/gr8stuff.co.za/contactsms.asp';
if (shost=='pandasam') document.smsresform.action='http://pandasam/gr8stuff.co.za/contactsms.asp';
document.smsresform.ref.value=document.location.href;
document.smsresform.submit();
}
else {
themessage = themessage + cr + cr + "This information is required so that we can send you our details.";
alert(themessage);
return false;
   }
}
// -->// gr8_control.innerHTML=gr8_contactsmsform_htm.replace(/\|\~/g,'\n').replace(/\|\^/g,"'");
<!--
function emailverify() {
var cr = String.fromCharCode(13);
var themessage = "Please complete the following fields: " + cr;
if (document.emailresform.name.value=="") {
themessage = themessage + cr + "   Your Name";
}
if (document.emailresform.email.value=="") {
themessage = themessage + cr + "   email address";
} else {
if (!validEmail(document.emailresform.email.value)) { themessage = themessage + cr + "   Invalid email address"; }
}
if (themessage == "Please complete the following fields: " + cr) {
var shost=document.location.hostname;
if (shost=='pandanote') document.emailresform.action='http://pandanote:90/gr8stuff.co.za/contactemail.asp';
if (shost=='pandasam') document.emailresform.action='http://pandasam/gr8stuff.co.za/contactemail.asp';
document.emailresform.ref.value=document.location.href;
document.emailresform.submit();
}
else {
themessage = themessage + cr + cr + "This information is required so that we can send you our details.";
alert(themessage);
return false;
   }
}
// -->// gr8_control.innerHTML=gr8_contactemailform_htm.replace(/\|\~/g,'\n').replace(/\|\^/g,"'");
<!--
function verify() {
var cr = String.fromCharCode(13);
var themessage = "Please complete the following fields: " + cr;
if (document.resform.name.value=="") {
themessage = themessage + cr + "   Your Name";
}
if (document.resform.email.value!=="") {
  if (!validEmail(document.resform.email.value)) { themessage = themessage + cr + "   Invalid email address"; }
}
if (document.resform.cellno.value=="" && document.resform.email.value=="") {
themessage = themessage + cr + "   Contact (Cell Phone number or email address)";
}
if (document.resform.msg.value=="") {
themessage = themessage + cr + "   Your Message";
}
if (themessage == "Please complete the following fields: " + cr) {
var shost=document.location.hostname;
if (shost=='pandanote') document.resform.action='http://pandanote:90/gr8stuff.co.za/contactmsg.asp';
if (shost=='pandasam') document.resform.action='http://pandasam/gr8stuff.co.za/contactmsg.asp';
document.resform.ref.value=document.location.href;
document.resform.submit();
}
else {
themessage = themessage + cr + cr + "Please supply us with the information in order to make contact with us.";
alert(themessage);
return false;
   }
}
function validEmail(addr) {
var invalidChars = '\/\'\\ ";:?!()[]\{\}^|';
for (i=0; i<invalidChars.length; i++) {
   if (addr.indexOf(invalidChars.charAt(i),0) > -1) return false;
}
for (i=0; i<addr.length; i++) {
   if (addr.charCodeAt(i)>127) return false;
}
var atPos = addr.indexOf('@',0);
if (atPos == -1) return false;
if (atPos == 0) return false;
if (addr.indexOf('@', atPos + 1) > - 1) return false;
if (addr.indexOf('.', atPos) == -1) return false;
if (addr.indexOf('@.',0) != -1) return false;
if (addr.indexOf('.@',0) != -1) return false;
if (addr.indexOf('..',0) != -1) return false;
var suffix = addr.substring(addr.lastIndexOf('.')+1);
if (suffix.length != 2 && suffix != 'com' && suffix != 'net' && suffix != 'org' && suffix != 'edu' && suffix != 'int' && suffix != 'mil' && suffix != 'gov' & suffix != 'arpa' && suffix != 'biz' && suffix != 'aero' && suffix != 'name' && suffix != 'coop' && suffix != 'info' && suffix != 'pro' && suffix != 'museum') return false;
return true;
}
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else 
countfield.value = maxlimit - field.value.length;
}
function contactform(sform) {
if (sform=='contactsmsform.htm') { gr8_contact.innerHTML=gr8_contactsmsform_htm.replace(/\|\~/g,'\n').replace(/\|\^/g,"'"); }
if (sform=='contactemailform.htm') { gr8_contact.innerHTML=gr8_contactemailform_htm.replace(/\|\~/g,'\n').replace(/\|\^/g,"'"); }
if (sform=='contactform.htm') { gr8_contact.innerHTML=gr8_contactform_htm.replace(/\|\~/g,'\n').replace(/\|\^/g,"'"); }
}
var isNS4 = (navigator.appName=="Netscape")?1:0;
// document.resform.ref.value=window.parent.document.location.href;
contactform('contactform.htm');
// -->// gr8_control.innerHTML=gr8_contactform_htm.replace(/\|\~/g,'\n').replace(/\|\^/g,"'");


