var Obj;
function MouseDown(obj){   
	Obj=document.getElementById(obj);
	//Obj=obj   
	Obj.setCapture()   
	Obj.l=event.x-Obj.style.pixelLeft   
	Obj.t=event.y-Obj.style.pixelTop   
}   
function MouseMove(){   
	if(Obj!=null){   
	Obj.style.left   =   event.x-Obj.l   
	Obj.style.top   =   event.y-Obj.t   
	}   
}   
function MouseUp(){   
	if(Obj!=null){   
	Obj.releaseCapture()   
	Obj=null   
	}   
}
function showSizePic(obj){
	i=0;
	//alert(obj);
	while(1){
		x = document.all('pic_'+i);
		xx=document.all('size_'+i);
		if(!x) break;
		if(obj=='pic_'+i){
			x.style.display='';
			xx.style.display='';
		}
		else{
			x.style.display='none';
			xx.style.display='none';
		}
		i++;
	}
}
function showHidAll(obj){
	i=0;
	while(1){
		x = document.all(obj+i);
		if(!x) break;
		if(x.style.display=='')
			x.style.display='none';
		else
			x.style.display='';
		i++;
	}
}

function SetShow(id)
{
	obj=document.getElementById(id);
	if(obj.style.visibility=="hidden")
		obj.style.visibility="visible";
	else
		obj.style.visibility="hidden";
}

function viewpic(src,No){
newpic=window.open("viewpic.php?src="+src+"&no="+No,"","toolbar =no, menubar=no, scrollbars=no, resizable=no, location=no, status=no,top=0,left=0,width=640,height=480");
	if (document.all){
		newpic.moveTo(0,0);
	}
}

function addOption(objSelectNow,txt,val)
{
	var objOption = document.createElement("OPTION");
	objOption.text= txt;
	objOption.value=val;
	objSelectNow.options.add(objOption);
}
function addOptionGroup(selectId,optGroupString,sel)
{
	var ary = optGroupString.split("@");
	var optGroup = ary[0].split("^");
	var optVal = ary[1].split("^");

	var objSelect = document.getElementsByTagName("SELECT");
	var objSelectNow = objSelect[selectId];
	len=0;
	Index=0;
	if(objSelectNow.length) len=1;
	objSelectNow.length =len;
	newI=len;
	for (i=0; i<optGroup.length && optVal[i]!=''; i++)
	{
		if(selectId=="partgroup" ){
			if(sel_fag==1){
				tmp = optVal[i].substr(0,1);
				if(tmp<=3){
					addOption(objSelectNow, optGroup[i], optVal[i]);
					if(optVal[i] == sel){ 
						Index=newI;
					}else{newI++;}
				}
			}else if(sel_fag==2){
				tmp = optVal[i].substr(0,1);
				if(tmp>=4 && tmp <=7){
					addOption(objSelectNow, optGroup[i], optVal[i]);
					if(optVal[i] == sel){ 
						Index=newI;
					}else{newI++;}
				}
			}else{
				addOption(objSelectNow, optGroup[i], optVal[i]);
				if(optVal[i] == sel){ 
					Index=newI;
				}else{newI++;}
			}
		}else{
			addOption(objSelectNow, optGroup[i], optVal[i]);
			if(optVal[i] == sel){ 
				Index=newI;
			}else{newI++;}
		}
	}
	if(Index) objSelectNow.options[Index].selected=true;
}
function showpro(obj){
	var arr = new Array();
	arr[0]='proshow_Speci';
	arr[1]='proshow_APP_A';
	arr[2]='proshow_APP_E';
	var arr2 = new Array();
	arr2[0]='proshow_Speci_Info';
	arr2[1]='proshow_APP_A_Info';
	arr2[2]='proshow_APP_E_Info';
	for(i=0;i<3;i++){
		if(obj==arr[i]){
			document.getElementById(arr[i]).className="prosel";
			document.getElementById(arr2[i]).style.display="";
		}else{
			document.getElementById(arr[i]).className="prodef";
			document.getElementById(arr2[i]).style.display="none";
		}
	}
}