function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function setFrame(Page,IDProduct){
	objFrame=MM_findObj('winFrame');
	gotoURL=Page+'?IDproduct=' + IDProduct;
	objFrame.src=gotoURL;
	MM_showHideLayers('winLarge','','show');
}

function setFrameSmall(Page,IDPage){
	objFrame=MM_findObj('winFrameSmall');
	gotoURL=Page+'?IDPage=' + IDPage;
	objFrame.src=gotoURL;
	MM_showHideLayers('winSmall','','show');
}

function hideAll(tagName){
	var tag = document.getElementsByTagName('UL')
	for(x=0; x<tag.length; x++){
	//hide all div layers with the 'nav' attribute	
		if(tag[x].getAttribute(tagName)){
			tag[x].style.left='-10000px';
		}
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function MM_setTextOfLayer(objId,x,newText) { //v9.0
  with (document) if (getElementById && ((obj=getElementById(objId))!=null))
    with (obj) innerHTML = unescape(newText);
}


function randomNumber(limit){
  return Math.floor(Math.random()*limit);
}

function randOrd(){
return (Math.round(Math.random())-0.5); } 

function submitForm(frmName){
	oForm=MM_findObj(frmName);
	oForm.submit();
}

