function hahaa(){
	
			var ghteo=document.getElementById('image');
			var junk=document.getElementById('junk');
			var tjeunk=document.getElementById('buton');
			var br=document.createElement('br');
			//tmp=g.style;
			var xxx=ghteo.value;
				
			if(xxx!=""){

					ni=document.createElement('input');
					ni.setAttribute('id','image');
					ni.setAttribute('name','guster');
					ni.setAttribute('type','file');
					ni.style.margin="0px -160px";
					ni.style.position="absolute";
					ni.style.opacity="0";
					
					ni.style.filter="alpha(opacity=0)";

					ghteo.style.opacity="1";
					ghteo.style.filter="alpha(opacity=100)";
					ghteo.style.margin="0px 0px";
					ghteo.style.position='relative';

					if ((version >= 5.5) && (version <=7)){
					
						//ghteo.detachEvent('onblur',function (e){hahaa();} );
						ni.attachEvent('onblur',function (e){hahaa();} );
						ni.attachEvent('onclick',function (e){losefocus();} );
						ni.attachEvent('onmouseover',function (e){colorplus(2);} );
						ni.attachEvent('onmouseout',function (e){colorplus(1);} );
					} else {
						ni.setAttribute('onblur','hahaa()');
						ni.setAttribute('onclick','losefocus()');
						ni.setAttribute('onmouseover','colorplus(2)');
						ni.setAttribute('onmouseout','colorplus(1)');
						
					}
					
				//ni.style=tmp;
			
		
			junk.appendChild(ghteo);
			junk.appendChild(br);
			tjeunk.appendChild(ni);
			
			//ghteo.removeAttribute('name');
			ghteo.setAttribute('name','image[]');
			

			alert(ghteo.getAttribute('name'));
			ghteo.setAttribute('id','hx');
			
	
			
			
			}
			
			
			
		}
		function hahaa2(){
	
			var ghteo=document.getElementById('image');
			var junk=document.getElementById('junk');
			var tjeunk=document.getElementById('buton');
			var br=document.createElement('br');
			//tmp=g.style;
			var xxx=ghteo.value;
				
			if(xxx!=""){
	
					ni=document.createElement('input');
					ni.setAttribute('id','image');
					ni.setAttribute('name','guster');
					ni.setAttribute('type','file');
					ni.style.margin="0px -160px";
					ni.style.position="absolute";
					ni.style.opacity="0";
					
					ni.style.filter="alpha(opacity=0)";

					ghteo.style.opacity="1";
					ghteo.style.filter="alpha(opacity=100)";
					ghteo.style.margin="0px 0px";
					ghteo.style.position='relative';

					if ((version >= 5.5) && (version <=7)){
					
						//ghteo.detachEvent('onblur',function (e){hahaa();} );
						ni.attachEvent('onblur',function (e){hahaa2();} );
						ni.attachEvent('onclick',function (e){losefocus2();} );
						ni.attachEvent('onmouseover',function (e){colorplus(2);} );
						ni.attachEvent('onmouseout',function (e){colorplus(1);} );
					} else {
						ni.setAttribute('onblur','hahaa2()');
						ni.setAttribute('onclick','losefocus2()');
						ni.setAttribute('onmouseover','colorplus(2)');
						ni.setAttribute('onmouseout','colorplus(1)');
						
					}
					
				//ni.style=tmp;
			
		
			junk.appendChild(ghteo);
			junk.appendChild(br);
	
				tjeunk.appendChild(ni);

		
			ghteo.style.width="100px";

			ghteo.setAttribute('name','image[]');
			ghteo.setAttribute('id','hx');
			ghteo.setAttribute('size','5');
			
			
			
			}
			
			
			
		}
		function losefocus(){
		
			
			ghteo=document.getElementById('image');
			var xxx=ghteo.value;
		
			if(xxx==''){
			
				setTimeout('losefocus()',1000);
				
			} else {
				//ghteo.blur();
				hahaa();

			}
		
		}
				function losefocus2(){
		

			ghteo=document.getElementById('image');
			var xxx=ghteo.value;
		
			if(xxx==''){
			
				setTimeout('losefocus2()',1000);
				
			} else {
				//ghteo.blur();
				hahaa2();

			}
		
		}
		
		function colorplus(v){
		ddd=document.getElementById('plusul');
		if(v==1){
			ddd.style.background="url('images/small_add.gif')";
		} else {
			ddd.style.background="url('images/small_add_hvr.gif')";
		}
		
		}


function addmorepicture(){

br=document.createElement('br');

br2=document.createElement('br');

el=document.createElement('input');

//el.setAttribute('size','43');

dd=document.getElementById('picturediv');

el.setAttribute('type','file');
el.setAttribute('name','image[]');


dd.appendChild(el);
dd.appendChild(br2);
dd.appendChild(br);

}


var  textulcurent=1;
var backgroundcurent="";
function showdoarlang(t){

	vv=t.value;
	
	document.getElementById('lng'+textulcurent).style.display="none";

	textulcurent=vv;
	document.getElementById('lng'+textulcurent).style.display="block";
	

}

function showdelete(t,v){
	backgroundcurent=t.style.background;

	t.style.background="#e1e9ee";
	document.getElementById('delbuton'+v).style.display="block";
}
function deldelete(t,v){
carre=document.getElementById("statusc"+v);

	if(carre.checked!=true){
	t.style.background=backgroundcurent;
	document.getElementById('delbuton'+v).style.display="none";
	}
}

function deldelete2(t,v){

	t.style.background=backgroundcurent;
	document.getElementById('delbuton'+v).style.display="none";
	
}

/////////////////////////////////////////////////////////////////////
function confirmDeleteDealerAuctions(objDel,pg_nr) {
	name='';
	contor=0;
	var idiuri = new Array(0);
	if(document.dealerAnwendungenForm.dealerAnwendungenChk.length!=null){	
		for (i = 0; i < document.dealerAnwendungenForm.dealerAnwendungenChk.length; i++){
			if(document.dealerAnwendungenForm.dealerAnwendungenChk[i].checked){
				contor++;
				idiuri.push(document.dealerAnwendungenForm.dealerAnwendungenChk[i].value)
			}
		}
	}else{
			if(document.dealerAnwendungenForm.dealerAnwendungenChk.checked){
				contor++;
				idiuri.push(document.dealerAnwendungenForm.dealerAnwendungenChk.value)
			}
	}	
	if (contor==0){
		alert("No rows selected!")
	}else{
		var answer = confirm("Do you really want to delete selected items?" )
		if (answer){
			sir=idiuri.join(',')
			url="del_auctions.php?idlist="+sir+"&pg_nr="+pg_nr
			//alert(url)
			document.location.href = url
		}
	}
}



function delete_product_picture(t,nr){
if(confirm("Do you really want to delete ?")){
	
	 var myConn = new XHConn();
		 myConn.connect("delete_product_pictures.php?id="+nr, 'POST', '', justdelete);
	t.parentNode.style.display='none';
		 
	}
	var justdelete= function(ox){
		cc=ox.responseText;
	}
}
