//////////////////////////////////////////
//Copyright
//This software is copyright of amigura
//and http://www.amigura.co.uk
//////////////////////////////////////////

<!--

function checkrequired(amigura) {
	var pass = true;
	for(i = 0; i < amigura.length; i++) {
		var tempobj = amigura.elements[i];
		if(tempobj.alt == "required") {
			if(tempobj.value == '') {
				pass = false;
				break;
			}
		}
	}
	if(!pass) {
		alert("Please enter the required information.");
		tempobj.focus();
		return false;
	}
	else { return true; }
}

function rt(ty){
var temp1 = document.em.messagep.value;

function insertAtCursor(myField, myValue) {
  if (document.selection) {
    myField.focus();
    sel = document.selection.createRange();
    sel.text = myValue;
  }
  else if (myField.selectionStart || myField.selectionStart == 0) {
    var startPos = myField.selectionStart;
    var endPos = myField.selectionEnd;
    myField.value = myField.value.substring(0, startPos)
                  + myValue
                  + myField.value.substring(endPos, myField.value.length);}

  else {    myField.value += myValue;  }
}
if(ty == 1){var temp =  prompt("Enter text to bold",'');if (temp!=null && temp!=""){insertAtCursor(document.em.messagep, "<b>" + temp + "</b>");}}
if(ty == 2){var temp =  prompt("Enter text to italic",'');if (temp!=null && temp!=""){insertAtCursor(document.em.messagep, "<i>" + temp + "</i>");}}
if(ty == 3){var temp =  prompt("Enter text to underline",'');if (temp!=null && temp!=""){insertAtCursor(document.em.messagep, "<u>" + temp + "</u>");}}
}

function sf(){
document.myform.submit(); do_totals1();
}


// pro
function do_totals1() { 
		document.all.pws.style.pixelTop = (document.body.scrollTop + 50);
		document.all.pws.style.visibility="visible";
		 window.setTimeout('do_totals2()',10000);
		}	

function do_totals2() {
		lengthy_calculation();
		document.all.pws.style.visibility="hidden";
		}

function lengthy_calculation() {
		var x,y
		for(x=0;x<1000000;x++) { y += (x * y) / (y - x); }
		}
// pro		

//-->
