// JavaScript Document

<!--
function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
    } if (errors) alert('The following error(s) occurred:\n'+errors);
    document.MM_returnValue = (errors == '');
} }

function searchNow(id, section){

	if(id>0){
		if(section=='category')
			var link='index.php?pg=2&ct='+id;
		
		else if(section=='style')
			var link='index.php?pg=2&sl='+id;	
		
		location.href=link;
	}
	else
		return false;
}

function searchKey(tag,e){
     var Ucode=e.keyCode? e.keyCode : e.charCode
     if (Ucode == 13){
		if(tag=='' || tag=='Keywords')
			return false;
		else
		{	 	
			var link='index.php?pg=2&ky='+tag;	
			window.location.href=link;
		}
		
     }
}

function moreInformation(win)
{
	var el = document.getElementById(win);
	el.style.display = (el.style.display != 'none' ? 'none' : '' );
}

function addFavorites()
{
	var title='Trichologist Clinic/';
	var url='http://www.trichologist-clinic.com/';
	if (document.all)
		window.external.AddFavorite(url, title);
	else if (window.sidebar)
		window.sidebar.addPanel(title, url, '');
}

function winShowHide(id)
{
	var win = document.getElementById(id);
	win.style.display = (win.style.display != 'none' ? 'none' : '' );
}
//-->

