function toggle(objid)
{
  my_obj = document.getElementById(objid);
  if (my_obj.style.display == 'none')
  {
    my_obj.style.display = '';
  }
    else
  {
    my_obj.style.display = 'none';
  }
  
switch(objid)
{
case "menucat1":
  document.getElementById("menucat2").style.display = 'none' 
  break;    
case "menucat2":
  document.getElementById("menucat1").style.display = 'none' 
  break;    
default:
  document.getElementById("menucat1").style.display = 'block' 
  document.getElementById("menucat2").style.display = 'none' 
  break;    
}
 

}
 
 
function openinvite(){
var which="invitefriend.asp"
whichit=window.open(which,"","width=650,height=550,location=no,menubar=no,status=no,titlebar=no,toolbar=no,scrollbars=yes,resizable=yes")
}
 
function goback(){
history.go(-1)
}
 
 
function ShowSelect(f,n) { 
  if (f.elements[n].options[f.elements[n].selectedIndex].value == 'SELECT') { 
  return; 
			 } 
var sURL = f.elements[n].options[f.elements[n].selectedIndex].value;
window.location.href = sURL 
	} 
	
	

function setsigninon(x)
{
switch(x.id)
{
case "v_email":
  document.getElementById(x.id).style.backgroundImage = "none";  
  break;    
case "v_pwd":
  document.getElementById(x.id).style.backgroundImage = "none"  ;
  break;    
default:
  break;    
}
 
} 

function setsigninoff(x)
{
 
switch(x.id)
{
case "v_email":
  if (trim(x.value) == '') 
  { 
    document.getElementById(x.id).style.backgroundImage = "url(images/signin-email.gif)";
	document.getElementById(x.id).style.backgroundRepeat = "no-repeat";  
  } 
  else
  { document.getElementById(x.id).style.backgroundImage = "none"  ; } 
 
  break;
case "v_pwd":
  if (trim(x.value) == '') 
  { 
    document.getElementById(x.id).style.backgroundImage = "url(images/signin-password.gif)"; 
	document.getElementById(x.id).style.backgroundRepeat = "no-repeat";
  } 
  else
  { document.getElementById(x.id).style.backgroundImage = "none"  ; } 
  break;
default:
  break;
}
 x.value = trim(x.value);
}



function setsignin()
{
var semail = document.getElementById("v_email");
var spwd = document.getElementById("v_pwd");
if (trim(semail.value) == '') 
  { semail.style.backgroundImage = "url(images/signin-email.gif)"; } 
else
  { semail.style.background = "none"  ; } 
 

if (trim(spwd.value) == '') 
  { spwd.style.backgroundImage = "url(images/signin-password.gif)"; } 
else
  { spwd.style.background = "none"  ; } 
  
semail.style.backgroundRepeat = "no-repeat"; 
spwd.style.backgroundRepeat = "no-repeat"; 
}


function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}

 function popUp(strURL,strType,strHeight,strWidth) {
  
  wleft = (screen.width - strWidth) / 2;
  wtop = (screen.height - strHeight) / 2;
  
  if (wleft < 0) {
    w = screen.width;
    wleft = 0;
  }
  if (wtop < 0) {
    h = screen.height;
    wtop = 0;
  }
  
  if (screen.width  < strWidth) {
    strWidth = screen.width;
    wleft = 0;
  }
  if (screen.height < strHeight) {
    strHeight = screen.height;
    wtop = 0;
  }
  
var strOptions="";
strOptions="resizable,height="+strHeight+",width="+strWidth+',left=' + wleft + ', top=' + wtop + ', ' +
    'location=no, menubar=no, ' +
    'status=no, toolbar=no, scrollbars=Yes, resizable=no';
newWin = window.open(strURL, 'newWin', strOptions);
newWin.focus();
}
