function showspecs()
{
	elmspec=locate_elm('bup_specificatii');
	elmacc =locate_elm('bup_accesorii');
	
	elmspec.style.display='block';
	elmacc.style.display='none';
	
	elmfh=locate_elm('first_holder');
	elmfo=locate_elm('first_one');
	
	elmfh.className='bup_det_off_spec_holder';
	elmfo.className='bup_det_off_spec';
	
	elmsh=locate_elm('second_holder');
	elmso=locate_elm('second_one');
	
	elmsh.className='bup_det_off_acc_holder';
	elmso.className='bup_det_off_acc';
}

function showacc()
{
	elmspec=locate_elm('bup_specificatii');
	elmacc =locate_elm('bup_accesorii');
	
	elmspec.style.display='none';
	elmacc.style.display='block';
	
	elmfh=locate_elm('first_holder');
	elmfo=locate_elm('first_one');
	
	elmfh.className='bup_det_off_acc_holder';
	elmfo.className='bup_det_off_acc';
	
	elmsh=locate_elm('second_holder');
	elmso=locate_elm('second_one');
	
	elmsh.className='bup_det_off_spec_holder';
	elmso.className='bup_det_off_spec';
}


var afisatcur='nu';
function vezi(x)
{
	elm=locate_elm(x);
	
	if(elm.style.display!='block')
		{
			
			elm.style.display='block';
			if(afisatcur!='nu')
				{
					elma=locate_elm(afisatcur);
					if(elma)
						{
							elma.style.display='none';	
						}
				}
			afisatcur=x;
		}
	else
		{
			elm.style.display='none';
			afisatcur='nu';
		}
}

var afisatlist='poza_0';
function bigpic(x)
{
	elm=locate_elm(x);
	
	if(elm)
		{
			elm.style.display='block';
			if(afisatlist!=x)
				{
					elma=locate_elm(afisatlist);
					if(elma)
						{
							elma.style.display='none';	
						}
				}
			afisatlist=x;
		}
}

function offerimg(x)
{
	elm=locate_elm('ofbigp');
	if(elm)
		{
			elm.src=x;	
		}
}

function locate_elm(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=locate_elm(n,d.layers[i].document);
		
		if(!x && d.getElementById)
		x=d.getElementById(n);
		
		return x;
	}


/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}

	
var cursor = {x:0, y:0};
if(document.all) { document.onmousemove = UpdateCursorPositionDocAll; }
else { document.onmousemove = UpdateCursorPosition; }
	
	

function new_win_print(ucn)
	{
			
		if(document.all)
			{
				sx=window.screenLeft;
				sy=window.screenTop;
			}
		else
			{
				sx=window.screenX;
				sy=window.screenY;
			}
			
		if(document.all)
			{
				if(document.compatMode == "CSS1Compat")
					{
						tx=document.body.parentNode.scrollLeft;
						ty=document.body.parentNode.scrollTop;
					}
				else
					{
						tx=document.body.scrollLeft;
						ty=document.body.scrollTop;
					}
			}
		else
			{
				tx=window.scrollX;
				ty=window.scrollY;
			}
		
		if(cursor.y<130)
			{
				y=10;
			}
		else
			{
				y=cursor.y-130;
			}
		if(cursor.x<380)
			{
				x=10;
			}
		else
			{
				x=cursor.x-380;
			}
		
		x=x+sx-tx;
		y=y+sy-ty;
  		window.open("print?ucn="+ucn, "", "WIDTH=620,HEIGHT=520, scrollbars=yes, TOP="+y+" ,LEFT="+x+"");
	}

	
function new_win_user(s, p, lang)
	{
			
		if(document.all)
			{
				sx=window.screenLeft;
				sy=window.screenTop;
			}
		else
			{
				sx=window.screenX;
				sy=window.screenY;
			}
			
		if(document.all)
			{
				if(document.compatMode == "CSS1Compat")
					{
						tx=document.body.parentNode.scrollLeft;
						ty=document.body.parentNode.scrollTop;
					}
				else
					{
						tx=document.body.scrollLeft;
						ty=document.body.scrollTop;
					}
			}
		else
			{
				tx=window.scrollX;
				ty=window.scrollY;
			}
		
		if(cursor.y<130)
			{
				y=10;
			}
		else
			{
				y=cursor.y-130;
			}
		if(cursor.x<380)
			{
				x=10;
			}
		else
			{
				x=cursor.x-380;
			}
		
		x=x+sx-tx;
		y=y+sy-ty;
  		window.open("pop.php?id="+s+"&pagina="+p+"&lang="+lang,"","WIDTH=600,HEIGHT=520, TOP="+y+" ,LEFT="+x+"");
	}
	
	
function new_win_user2(s, p, lang)
	{
			
		if(document.all)
			{
				sx=window.screenLeft;
				sy=window.screenTop;
			}
		else
			{
				sx=window.screenX;
				sy=window.screenY;
			}
			
		if(document.all)
			{
				if(document.compatMode == "CSS1Compat")
					{
						tx=document.body.parentNode.scrollLeft;
						ty=document.body.parentNode.scrollTop;
					}
				else
					{
						tx=document.body.scrollLeft;
						ty=document.body.scrollTop;
					}
			}
		else
			{
				tx=window.scrollX;
				ty=window.scrollY;
			}
		
		if(cursor.y<130)
			{
				y=10;
			}
		else
			{
				y=cursor.y-130;
			}
		if(cursor.x<380)
			{
				x=10;
			}
		else
			{
				x=cursor.x-380;
			}
		
		x=x+sx-tx;
		y=y+sy-ty;
  		window.open("pop2.php?id="+s+"&pagina="+p+"&lang="+lang,"","WIDTH=600,HEIGHT=520, TOP="+y+" ,LEFT="+x+"");
	}


function UpdateCursorPosition(e)
	{
		cursor.x = e.pageX;
		cursor.y = e.pageY;
	}
function UpdateCursorPositionDocAll(e)
	{
		cursor.x = event.clientX;
		cursor.y = event.clientY;
	}
	
function changecolor(sid,color)
{
   color=eval("document.all."+sid+".style.color="+"\"" + color + "\"");
   //style=eval("document.all."+sid+".style.textDecoration='underline'");
}
function changeoldcolor(sid,color)
{
    color=eval("document.all."+sid+".style.color="+"\"" + color + "\"");
	//style=eval("document.all."+sid+".style.textDecoration='none'");
}