function preview2(){
	var result='';
	var f=document.forms.number;
	for (var i in f.elements) {
      if(f.elements[i] && f.elements[i].name && f.elements[i].value)
	  {
	  result += '&'+f.elements[i].name + "=" + f.elements[i].value
	  }
   }
	var preview_url='http://www.templatehelp.com/aff/preview.php?'+result
	window.open(preview_url,'preview','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=790,height=550');
}


document.write('<form name="number" action="http://www.templatehelp.com/aff/preview.php">');
document.write('Search by Template Number<br/>');
document.write('<input type="text"  name="i" size="4" style="margin-top:10px;margin-bottom:0px;margin-left:0px;margin-right:0px;width:35pt;font-size:8pt">');
document.write('<input type="hidden" name="skin" value="1" >');

document.write('<input type="hidden" name="sadult" value="off" >');
document.write('<input type="hidden" name="aff" value="T2DMan">');
document.write('<input type="hidden" name="pr" value="yes">');
document.write('<input type="hidden" name="src" value="yes">');
document.write('<input type="hidden" name="nt" value="no">');
document.write('<input type="hidden" name="currency" value="5">');

//document.write('<input type="button" value="F" style="margin-top:10px;margin-bottom:0px;margin-left:5px;margin-right:0px;width:40pt;font-size:8pt" onclick="preview2()">');
document.write('<input type="submit" style="margin-top:10px;margin-bottom:0px;margin-left:5px;margin-right:0px;width:40pt;font-size:8pt" value="Search">');
document.write('</form>');