<br />
<b>Warning</b>:  ob_start() [<a href='ref.outcontrol?PHPSESSID=a557bd1a444cbc558186efb982ccb2e0'>ref.outcontrol</a>]: output handler 'ob_gzhandler' cannot be used after 'URL-Rewriter' in <b>/home/techchee/public_html/taf.php</b> on line <b>7</b><br />
function trim(s) {
	while (s.substring(0,1) == ' ') {
	s = s.substring(1,s.length);
	}
	while (s.substring(s.length-1,s.length) == ' ') {
		s = s.substring(0,s.length-1);
	}
	return s;
}

function expOrCollasEle(id)
{
	var e= getElement(id); var ee= getElement('a_Span_clik_'+id);
	if ( e!=null )
	{
		if ( e.style.display=='none' || e.style.display==''){
			e.style.display='block';ee.innerHTML='&nbsp;--&nbsp;';
                }
		else{
			e.style.display='none';;ee.innerHTML='&nbsp;+&nbsp;';
                }
	}
}

function getElement(id)
{
	var select;
	if ( document.all )
	{
		select = document.all(id);
		isIE=true;
	}
	else
		select = document.getElementById(id);
	return select;
}

function printDivForm()
{
	var d = getElement('tafDivFormByTechChee');
	if ( d!=null )
	{
		var itxt='<table border=0 bgcolor="#EEEEEE" '+
		'cellspacing="1" cellpadding="1" align="center" width="100%" style="font-size:8pt;font-family:verdana,arial;">'+
		'<tr style="background-color:white;"><td valign=top align="center" bgcolor="#EEEEEE" width="100%" colspan="2"><b>'+
		'If you like <a href="http://techchee.com">TechChee</a>, help us spread the words</b></td></tr>'+
		'<tr style="background-color:white;"><td valign=top align="left" width="30%"><b>Your name</b></td>'+
		'<td valign=top align="left" width="70%"><input type=text name="TechChee_TafName" '+
		'id="TechChee_TafName" size="30" maxlength="80" value=""/></td></tr>'+
		'<tr style="background-color:white;"><td valign=top align="left" width="30%"><b>Your email</b></td>'+
		'<td valign=top align="left" width="70%"><input type=text name="TechChee_TafUrEmail" '+
		'id="TechChee_TafUrEmail" size="35" maxlength="80" value=""/></td></tr>'+
		'<tr style="background-color:white;"><td valign=top align="left" width="30%"><b>Your friend\'s email</b></td>'+
		'<td valign=top align="left" width="70%"><input type=text name="TechChee_TafFrenEmail" '+
		'id="TechChee_TafFrenEmail" size="35" maxlength="80" value=""/><br/><font size=1>Separate multiple emails with comma</font></td></tr>'+
		'<tr style="background-color:white;"><td valign=top align="left" width="30%"><b>Your message</b></td>'+
		'<td valign=top align="left" width="70%"><textarea name="TechChee_TafMessage" '+
		'id="TechChee_TafMessage" cols="35" rows="8">Hi my friend,\n\nI\'ve found a nice blog, www.techchee.com, a blog '+
		'that is updated daily about the latest gadgets, tech stuff and news, which I think you just simply don\'t '+
		'wanna miss </textarea></td></tr>'+
		'<tr style="background-color:white;"><td valign=top align="center" width="100%" colspan="2">'+
		'<input type="button" style="font-size:8pt;font-weight:bolder;" onClick="TafSubNow();" value="Tell Your Friend Now!"/>&nbsp;&nbsp;<span id="TechCheeTAFStatus"></span></td></tr></table>';

		d.innerHTML= itxt;

		TechChee_formLoaded=true ;
	}

}

function ShowStat2(t)
{

	var d = getElement('tafDivFormByTechChee');
	if ( d!=null )
	{
		d.innerHTML='<font color=red>'+t+'</font>';
	}
}

function TAFAjaxSNowReturn(req)
{
	return function()
	{
		/** only if req shows "complete" */
		if (req.readyState == 4)
		{
			if (req.status == 200)
			{

				if(req.responseXML==null)
				{

					ShowStat2('Failed!');
				}

	  			var responseXML= req.responseXML;
				var FrXML5=responseXML.getElementsByTagName('c');

				try{ShowStat2(FrXML5[0].firstChild.data);}catch(err){ShowStat2(err);}
			}
			else
				ShowStat2('State NOT ready '+req.responseText);
		}
	}
}

var TechChee_formLoaded=false ;

function TAFAjaxSubmitNow()
{
  try{


 	var url='/taf.php?m=2';

	var n = getElement('TechChee_TafName');
	if ( n!=null ){
		if (trim(n.value)==''){ alert('Please key in your name!'); n.focus(); clrSpinner(); return;}
		url+='&n='+encodeURIComponent(n.value);
	}
	var e = getElement('TechChee_TafUrEmail');
	if ( e!=null )
	{
		if (trim(e.value)==''){ alert('Please key in your email!'); e.focus(); clrSpinner(); return;}
		url+='&e='+encodeURIComponent(e.value);
	}
	var fe = getElement('TechChee_TafFrenEmail');
	if ( fe!=null ){

		if (trim(fe.value)==''){ alert('Please key in your friend\'s email!'); fe.focus(); clrSpinner(); return;}
		url+='&fe='+encodeURIComponent(fe.value);
	}
	var me = getElement('TechChee_TafMessage');
	if ( me!=null ){
		if (trim(me.value)==''){ alert('Please key in your message!'); me.focus(); clrSpinner(); return;}
		url+='&me='+encodeURIComponent(me.value);
	}

	var req;
	if (window.XMLHttpRequest)
	{
		req = new XMLHttpRequest();
		req.onreadystatechange = TAFAjaxSNowReturn(req);
		req.open('GET', url, true);
		req.send(null);
		/** branch for IE/Windows ActiveX version */
	}
	else if (window.ActiveXObject)
	{
		req = new ActiveXObject('Microsoft.XMLHTTP');
		if (req)
		{
			req.onreadystatechange = TAFAjaxSNowReturn(req);
			req.open('GET', url, true);
			req.send();
		}
	}
  }
  catch(err)
  {
  }
}


function TafSubNow()
{
	showSpinner('TechCheeTAFStatus','<font size="1">Submitting....wait...</font>');
	window.setTimeout("TAFAjaxSubmitNow()", 500);

}

function clrSpinner()
{
   var e= getElement ('TechCheeTAFStatus');
   if (e!=null )
  	 e.innerHTML='';

}

function showSpinner(t,c)
{
  if(c==null )c='Loading .... please wait ....';

  var e= getElement (t);
  if (e!=null )
  	e.innerHTML='<img align="center" src="/spinner.gif" title="Loading .... please wait ....." border="0"/> '+c;

}

function loadForm()
{
	if ( !TechChee_formLoaded ){
		showSpinner('tafDivFormByTechChee','Loading ..... Please wait....');
		window.setTimeout("printDivForm()", 1000);
	}
}
loadForm();
window.onfocus = loadForm;
window.onload = loadForm;

