var xmlHttp

function showCustomer(field,str,url,divname)
{ 
	function stateChanged() 
	{ 

		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{ 
			var docdiv=	document.getElementById(divname)
			docdiv.innerHTML=xmlHttp.responseText 
			
		} 
	} 

		
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 



url=url+"&"+field+"="+str

var sC=stateChanged
xmlHttp.onreadystatechange=sC
xmlHttp.open("GET",url,true)

xmlHttp.send(null)
}



function showCustomer1(field,str,url,divname)
{ 
	function stateChanged() 
	{ 

		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{ 
			var docdiv=	document.getElementById(divname)
			docdiv.innerHTML=xmlHttp.responseText; 
//-----------------------------------------------------------------	
try{
var slideShowOne=function(){
									var imgid = 'image';
									var imgdir = 'uploads';
									var imgext = '.jpg';
									var thumbid = 'thumbs';
									var auto = true;
									var autodelay = 5;
	var bxs,bxe,fxs,fxe,ys,ye,ta,ia,ie,st,ss,ft,fs,xp,yp,ci,t,tar,tarl,func;
	ta=document.getElementById(thumbid); ia=document.getElementById(imgid);
	t=ta.getElementsByTagName('li'); ie=document.all?true:false;
	st=3; ss=3; ft=10; fs=5; xp,yp=0;
	return{
		init:function(){
			document.onmousemove=this.pos; window.onresize=function(){setTimeout("slideShowOne.lim()",500)};
			ys=this.toppos(ta); ye=ys+ta.offsetHeight;
			len=t.length;tar=[];
			for(i=0;i<len;i++){
				var id=t[i].value; tar[i]=id;
				//t[i].onclick=new Function("slideShowOne.getimg('"+id+"')");
				//t[i].onclick=new Function("id","slideShowOne.getimgmy('"+id+"')");
				//var j=i+1;
				//t[i].onclick=function(id){					};
				//alert(j);
				if(i==0){this.getimg(id)}
			}
			tarl=tar.length;
		},
		scrl:function(d){
			clearInterval(ta.timer);
			var l=(d==-1)?0:(t[tarl-1].offsetLeft-(ta.parentNode.offsetWidth-t[tarl-1].offsetWidth)+10)
			ta.timer=setInterval(function(){slideShowOne.mv(d,l)},st);
		},
		mv:function(d,l){
			ta.style.left=ta.style.left||'0px';
			var left=ta.style.left.replace('px','');
			if(d==1){
				if(l-Math.abs(left)<=ss){
					this.cncl(ta.id); ta.style.left='-'+l+'px';
				}else{ta.style.left=left-ss+'px'}
			}else{
				if(Math.abs(left)-l<=ss){
					this.cncl(ta.id); ta.style.left=l+'px';
				}else{ta.style.left=parseInt(left)+ss+'px'}
			}
		},
		cncl:function(){clearTimeout(ta.timer)},
		getimg:function(id){
			//alert(id);
			if(auto){clearTimeout(ia.timer)}
			if(ci!=null){
				var ts,tsl,x;
				ts=ia.getElementsByTagName('img'); tsl=ts.length;x=0;
				for(x;x<tsl;x++){
					if(ci.id!=id){var o=ts[x]; clearInterval(o.timer); o.timer=setInterval(function(){slideShowOne.fdout(o)},fs)}
				}
			}
			if(!document.getElementById(id)){
				var i=document.createElement('img');
				ia.appendChild(i);
				i.id=id; i.av=0; i.style.opacity=0;
				i.style.filter='alpha(opacity=0)';
				i.src=imgdir+'/'+id+imgext;
			}else{
				i=document.getElementById(id); clearInterval(i.timer);
			}
			i.timer=setInterval(function(){slideShowOne.fdin(i)},fs);
		},
		nav:function(d){
			var c=0;
			for(key in tar){if(tar[key]==ci.id){c=key}}
			if(tar[parseInt(c)+d]){
				this.getimg(tar[parseInt(c)+d]);
			}else{
				if(d==1){
					this.getimg(tar[0]);
				}else{this.getimg(tar[tarl-1])}
			}
		},
		auto:function(){ia.timer=setInterval(function(){slideShowOne.nav(1)},autodelay*1000)},
		fdin:function(i){
			if(i.complete){i.av=i.av+fs; i.style.opacity=i.av/100; i.style.filter='alpha(opacity='+i.av+')'}
			if(i.av>=100){if(auto){this.auto()}; clearInterval(i.timer); ci=i}
		},
		fdout:function(i){
			i.av=i.av-fs; i.style.opacity=i.av/100;
			i.style.filter='alpha(opacity='+i.av+')';
			if(i.av<=0){clearInterval(i.timer); if(i.parentNode){i.parentNode.removeChild(i)}}
		},
		lim:function(){
			var taw,taa,len; taw=ta.parentNode.offsetWidth; taa=taw/4; 
			bxs=slideShowOne.leftpos(ta); bxe=bxs+taa; fxe=bxs+taw; fxs=fxe-taa;
		},
		pos:function(e){
			xp=ie?event.clientX+document.documentElement.scrollLeft:e.pageX; 
			yp=ie?event.clientY+document.documentElement.scrollTop:e.pageY;
			if(xp>bxs&&xp<bxe&&yp>ys&&yp<ye){
				slideShowOne.scrl(-1);
			}else if(xp>fxs&&xp<fxe&&yp>ys&&yp<ye){
				slideShowOne.scrl(1);
			}else{slideShowOne.cncl()}
		},
		leftpos:function(t){
			var l=0;
			if(t.offsetParent){
				while(1){l+=t.offsetLeft; if(!t.offsetParent){break}; t=t.offsetParent}
			}else if(t.x){l+=t.x}
			return l;
		},
		toppos:function(t){
			var p=0;
			if(t.offsetParent){
				while(1){p+=t.offsetTop; if(!t.offsetParent){break}; t=t.offsetParent}
			}else if(t.y){p+=t.y}
			return p;
		}
	};
}();

		slideShowOne.init(); 
		slideShowOne.lim();
}
catch (e)
{
}		
//----------{{{{{{{{{{{{{{{{{{{{
									function init_dw_Scroll() {
										var wndo = new dw_scrollObj('wn', 'lyr1');
										wndo.setUpScrollbar("dragBar", "track", "v", 1, 1);
										wndo.setUpScrollControls('scrollbar', true, 'v');
										// Demonstrating how you can include a jump to top link inside the scroll area 
										wndo.setUpScrollControls('wn');
										
									}
									
									function init_dw_Scroll_2() {
										var wndo_2 = new dw_scrollObj('wn_2', 'lyr1_2');
										wndo_2.setUpScrollbar("dragBar_2", "track_2", "v", 1, 1);
										wndo_2.setUpScrollControls('scrollbar_2', true, 'v');										
										// Links to swap content 
										//wndo_2.setUpLoadLinks('extra_controls');
										// Demonstrating jump to top and scroll to ID controls 
										//wndo_2.setUpScrollControls('extra_controls');
									
										// Demonstrating how you can include a jump to top link inside the scroll area 
										wndo_2.setUpScrollControls('wn_2');
										
									}
									
									function init_dw_Scroll_3() {
										var wndo_3 = new dw_scrollObj('wn_3', 'lyr1_3');
										wndo_3.setUpScrollbar("dragBar_3", "track_3", "v", 1, 1);
										wndo_3.setUpScrollControls('scrollbar_3', true, 'v');										
										wndo_3.setUpScrollControls('wn_3');
										
									}
									function init_dw_Scroll_4() {
										var wndo_4 = new dw_scrollObj('wn_4', 'lyr1_4');
										wndo_4.setUpScrollbar("dragBar_4", "track_4", "v", 1, 1);
										wndo_4.setUpScrollControls('scrollbar_4', true, 'v');										
										wndo_4.setUpScrollControls('wn_4');
										
									}
									// if necessary objects exists link in the style sheet and call the init function onload
									//if ( document.getElementById && document.getElementsByTagName ) {
										//dw_writeStyleSheet('css/extras_news.css');
										//addLoadEvent(init_dw_Scroll); //drug nachin na 
										try
										{
											init_dw_Scroll()
										}
										catch (e)
										{
										}
										
										try
										{
											init_dw_Scroll_2()
										}
										catch (e)
										{
										}
										
										
										try
										{
											init_dw_Scroll_4()
										}
										catch (e)
										{
										}
										
										//addLoadEvent(init_dw_Scroll); //drug nachin na 
										try
										{
											init_dw_Scroll_3()
										}
										catch (e)
										{
										}
									//}
	
	
//--------}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}

		} 
	} 

		
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 



url=url+"&"+field+"="+str

var sC=stateChanged
xmlHttp.onreadystatechange=sC
xmlHttp.open("GET",url,true)

xmlHttp.send(null)
}







function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest)
		{
		objXMLHttp=new XMLHttpRequest()
		}
	else if (window.ActiveXObject)
		{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
		}
	return objXMLHttp
}