/* =============================================================================JavaScript library - (c) 2003-2004 Luigi Cocconcelli <luigi@italmedia.net>AUTHOR:    Luigi Cocconcelli <luigi@italmedia.net>MODIFIED:  2004 feb 20DESCRIPTION:	Central place for all the client-side functions definition============================================================================= *///self.resizeTo(750,650); // absolute front window positioningvar D=document,WSP=" \t\n\r",CANCLICK=false,_P1="Please enter ",SADR="info",SDOM="solibumpercars",STLD="com";vars02 = _P1 + "a valid EMAIL ADDRESS\n(example: name@server.com)",s01 = "A valid EMAIL ADDRESS cannot contains white spaces",s25 = _P1 + "your COMPANY NAME",s05 = _P1 + "your FIRST NAME and LAST NAME",s18 = _P1 + "your PHONE NUMBER",s23 = _P1 + "your COUNTRY",s06 = _P1 + "the MESSAGE TEXT",s16 = "You must agree with Law 675/96 clause, to send the message";if (D.layers) { // align these with it's stylesheet	D.alinkColor="#666666"; // a:hover	D.vlinkColor="#666666"; // a:visited}function canSubmit(F) {	// DON'T PUT F.submit() OR FORMS WENT SUBMITTED 2 TIMES	if (CANCLICK) { F.reset(); return false }	CANCLICK = true; return true;}function selectFld(f) { f.select(); f.focus(); return true }function isEmpty(v) { return ((v == null) || (v.length < 1)) }function isWrong(f,s) { f.select(); alert(s); f.focus(); return false }function isBlank(v) {	var i, c; 	if (isEmpty(v)) return true;	for (i = 0; i < v.length; i++) {		c = v.charAt(i); if (WSP.indexOf(c) == -1) return false;	}	return true;}function tString(f,s) {	if (isEmpty(f.value)) return isWrong(f,s);	if (isBlank(f.value)) return isWrong(f,s);	return true;}function tEmail(f,s) {	var flv = f.value;	var lst = flv.length - 1, ati = flv.indexOf("@");	var atl = flv.lastIndexOf("@"), dot = flv.lastIndexOf(".");	for (i = 0; i < WSP.length; i++) {		var c = WSP.charAt(i);		if (flv.indexOf(c) > -1) return isWrong(f,s01);	}	if ((ati < 1) || (ati != atl) || (dot - ati < 3) || (lst - dot>4) ||		(lst - dot < 2) || (lst < 6)) return isWrong(f,s);	return true;}function tCkBox(f, s) {	var r = false; 	if (f.checked) r = true;//	for (var i = 0; i < f.length; i++) if (f[i].checked == true) r = true;	if (! r) alert(s);	return r;}function sTxt(s) {	if (isEmpty(s)) self.status = "";	else self.status = unescape(s);	return true;}function goTo(u) { location.href = u }function writEmail(a,u) {	var e; if (isEmpty(a)) { a = SADR };	e = unescape(a + "%40" + SDOM + "." + STLD);//	e = (a + unescape("%40") + SDOM + "." + STLD);	if (isEmpty(u)) {		D.write('<a href="ma'+'ilto:'+e+'" class="fc2">'+e+'<\/a>');	}	else {		D.write('<a href="'+u+'" class="fc2">'+e+'<\/a>');	}}function tCoupon(F) {	if (tString(F.fir,s25) &&		tString(F.nam,s05) &&		tEmail(F.ema,s02) &&		tString(F.pho,s18) &&		tString(F.cnr,s23) &&		tString(F.msg,s06) &&		tCkBox(F.agree,s16)		) return canSubmit(F);	return false;}defaultStatus = unescape(D.title);