/*	JAVASCIPT TOOL
 *	Browser IE 6, Firefox 1.5 and Opera 9.0
 *	
 *	This tool is free and open source (can u hide this code)
 *	20-10-2006    @ Sandi    < sandi@linuxku.com > 
 */ 
function Hs() {return (function(){});}
function SandiJs()
{
	this.joinHs = function joinHs_(aH)
	{
		var iR="";
		for (iK in aH) {
			if (typeof(aH[iK]) == typeof(10) || typeof(aH[iK]) == typeof('lima'))
			{
				iSem = String(aH[iK]).replace(/%/g,'%%');
				iSem = String(iSem).replace(/\"/g,'%"');
				iR += '"' + iK  + '" => "' + iSem + '",';
			}
			else if (typeof(aH[iK]) == typeof(Function))
			{
				iR += '"' + iK  + '" => ' + joinHs_(aH[iK]) + ',';
			}
		}
		return ('array(' + iR.slice(0,-1) + ')');
	}
	this.execLink = function _execLink(aForm, aLink)
	{
		aForm.action = aLink;
		aForm.submit();
	}
	/*	i ==> radio object like "documnet.form_name.radio_name"
	 *	o ==> value of radio
	*/
	this.radioValue = function _radioValue(aR)
	{
		for (iC = 0; iC < aR.length; iC++)
		{
			if (aR[iC].checked)
				return (aR[iC].value);
		}
	}
	this.substring = function _substring(aSrc, aStart, aLen)
	{
		return (aSrc.substr(aStart, aLen));
	}
	this.explode = function _explode(aDl, aSrc)
	{
		return (aSrc.split(aDl));
	}
	this.trim = function trim_(aI)
	{
		iS = 0;
		iE = aI.length - 1;
		while (iS <= iE && aI.charAt(iS) == " ") iS++;
		while (iS <= iE && aI.charAt(iE) == " ") iE--;
		return (aI.substring(iS, iE+1));
	}
}


