
function formcheck() {
document.form1.reciprocal.value = document.form2.reciprocal.value;
if(document.form3.service.checked){
document.form1.service.value = document.form3.service.value;}
else{document.form1.service.value = "";}
		if( document.form1.kat.value == "" ) {
		window.alert( 'You need to select a category.' );
		return false;}	
		if( document.form1.caption.value == "" ) {
		window.alert( 'You need to fill in a title.' );
		return false;}
		if( document.form1.caption.value.length > 75) {
		window.alert( 'Plesase check your title. The field has a maximum of 75 characters.' );
		return false;}
		var storlek = document.form1.description.value.length;
		if(storlek < 49 ) {
		window.alert( 'Your description must be at least 50 letters in length.' );
		return false;}
					   if(document.all){ // document.layers = NS
					    par = form1.description.value.split('\n');
     					 var ac =0;

						 for (var i=0; i <par.length; i++)
							  ac += Math.ceil(par[i].length/form1.description.cols);
							  if (ac > 10){
							  alert ('Sorry, you are out of lines. Maximum of 10 lines plesase.')
							  return false;
							  }
							  }
		if( document.form1.hyperlink.value == "" ) {
		window.alert( 'You need to fill in a url.' );
		return false;}	
		if( document.form1.hyperlink.value.length > 55) {
		window.alert( 'Plesase check your url. The field has a maximum of 55 characters.' );
		return false;}
		if( !document.form1.mail.value || document.form1.mail.value.replace( /[\w\-]+(\.[\w\-]+)*@[\w\-]+(\.[\w\-]+)+/i, "" ) ) {
		window.alert( 'You need to fill in your email address.' );
		return false;}
		if(!document.form2.checkbox.checked) {
		window.alert( 'Please, read the Surfwebtips submission agreement. If you agree to the terms, check the box I agree.' );
		return false;}
	else 
	 document.form1.caption.value = document.form1.caption.value.split(/["]/).join("'");
	 document.form1.hyperlink.value = document.form1.hyperlink.value.split(/["]/).join("'");
	 document.form1.description.value = document.form1.description.value.split(/["]/).join("'");
	 window.setTimeout('document.form1.submit();',100);}		   
function Count() {
     par = form1.description.value.split('\n');
     var ac = 0;
     for (var i=0; i <par.length; i++)
          ac += Math.ceil(par[i].length/form1.description.cols);
		  document.form1.counter.value = ac
		  if (ac > 10){
		  alert ('Sorry, you are out of lines. Maximum of 10 lines plesase.')
		  return false;}}
function Open2(){
	win=window.open("http://www.surfwebtips.com/reciprocalup.htm","myWin","height=500,width=500,toolbars=0,address=0,scrollbars=1");}
function Open(){
	win=window.open("http://www.surfwebtips.com/tos.htm","myWin","height=500,width=500,toolbars=0,address=0,scrollbars=1");}
function Open3(){
	win=window.open("http://www.surfwebtips.com/emailup.htm","myWin","height=300,width=300,toolbars=0,address=0,scrollbars=1");}
function Open4(){
	win=window.open("http://www.surfwebtips.com/demo-addsite.htm","myWin","height=850,width=950,toolbars=0,address=0,scrollbars=1");}
function Open5(){
	win=window.open("http://www.surfwebtips.com/demo-link-exchange.htm","myWin","height=850,width=950,toolbars=0,address=0,scrollbars=1");}
function Open6(){
	win=window.open("http://www.surfwebtips.com/linkexchangebox.htm","myWin","height=200,width=700,toolbars=0,address=0,scrollbars=0");}
	<!-- Original:  Ronnie T. Moore -->
<!-- Web Site:  The JavaScript Source -->

<!-- Dynamic 'fix' by: Nannette Thacker -->
<!-- Web Site: http://www.shiningstar.net -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
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;}