

//------------browser type-----------
isIE=document.all;
isNN=!document.all&&document.getElementById;
//------------browser type-----------

function clearTextBoxDefault(textBoxObj,baseValue)
{
	if (textBoxObj.value=="")
	{
		textBoxObj.value=baseValue;
	}
	else if (textBoxObj.value==baseValue)
	{
		textBoxObj.value="";
	}
}


function select_language(lang)
{
	location.href="http://www.ka-gold-jewelry.com/"+lang+"/";
}
//--------------object getting - cross browser------------
function get_object(objName)
{
	if (isIE)
	{
		evalText="document.all."+objName;
		Obj=eval(evalText);
	}
	else
	{
		Obj=document.getElementById(objName);
	}
	return Obj;
}

function get_hidden_obj(objName,form_name)
{
	if (isIE)
	{
		evalText="document.all."+objName;
		Obj=eval(evalText);
	}
	else
	{
		evalText="document."+form_name+"."+objName;
		Obj=eval(evalText);
	}
	return Obj;
}
//--------------object getting - cross browser------------


function isArray(obj)
{
	return(typeof(obj.length)=="undefined")?false:true;
}



function select_object(obj_id,form_name,hiddenName)
{
	var hiddenObj = eval('document.'+form_name+'.'+hiddenName);
	hiddenObj.value=obj_id;
}

function isValidEmail(str) {
   return (str.indexOf("@") > 0);
}

