function popupSAF(pl){
	var w=529;
	var h=454;
	var x=(screen.width/2)-(w/2);
	var y=(screen.height/2)-(h/2)-30;
	var safPopup=window.open('http://www.bigaonline.com/send_a_friend.php?	pl='+pl,'SAF','left='+x+',top='+y+',width='+w+',height='+h+',scrollbars=no');
	if (safPopup) safPopup.focus();
}

function swapImage(imgN,imgU){
	if(document.images)document.images[imgN].src=imgU;
}

function checkBox(id){
	if(document.getElementById(id).checked){
		document.getElementById(id).checked = false;
	}else{
		document.getElementById(id).checked = true;
	}
}

function PopupPic(sPicURL) {
     window.open( "popup.htm?"+sPicURL, "",  
     "resizable=1,HEIGHT=400,WIDTH=500");
   }
				
function toggleLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}

function checkUncheckAll(theElement) {
     var theForm = theElement.form, z = 0;
	 for(z=0; z<theForm.length;z++){
      if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall'){
	  theForm[z].checked = theElement.checked;
	  }
     }
    }

