// flash code
function bestground_site(lang){
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="780" height="540">');
    document.write('<param name="movie" value="site.swf?&l='+lang+'">');
    document.write('<param name="quality" value="high">');
	document.write('<param name="bgcolor" value="#003200">');
    document.write('<embed src="site.swf?&l='+lang+'" width="780" height="540" bgcolor="#003200" quality="high" allowScriptAccess="sameDomain" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>');			
    document.write('</object>');
}

// swap image restore
function swapImage() {
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// swap image
function swapImgRestore() {
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

//
function findObj(n, d) {
	  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=findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
//

// open browser window
function openBrWindow(url,w,h) {
	  window.open(url,'Bestground','scrollbars=yes,width='+w+',height='+h+'');
}

// pop up window
function popup(url,wname,w,h) {
	winStats='toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,resizable=no'
	winStats+='scrollbars=no,width='+w+',height='+h
	if (navigator.appName.indexOf("Microsoft")>=0) {
		winStats+=',left='+50+',top='+50
	}
	else {
		winStats+=',screenX='+50+',screenY='+50
	}
	floater=window.open(url,wname,winStats)
}
//

//Confirm prompt
function confirm_prompt(url) {
	if (confirm('¿Realmente desea borrar el producto?')) {
		window.location = url;
		}
	}
function confirm_prompt_1(url) {
	if (confirm('¿Realmente desea eliminar esta presentación del producto?')) {
		window.location = url;
		}
	}
  
function goToURL() { //v3.0
	  var i, args=goToURL.arguments; document.returnValue = false;
	  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
// Show / Hide Sections
function doSection (secNum){
	if (secNum.style.display=="none"){ secNum.style.display="" }
}
function noSection (secNum){
	if (secNum.style.display==""){ secNum.style.display="none" }
}