	function submitcoin_onclick(){
		formMain.action="submitCoinDef.do?" + fullQueryString;
	}
	function myTag_onclick(){
		OpenInsetPage(420,150,"./tagDef.do?" + refQueryString);
	}
	
   	function showDetail(id){
    	writeLoadingInfoCenter("detailAuctionSpace");
    	var httpURL = document.location.href;
    	if(httpURL.indexOf(':8080') != -1){
    		sendHttpRequest(portBasePath + "specificCoinDetailAuction.do?id="+id,detailAuction,false);
    	}else{
    		sendHttpRequest(basePath + "specificCoinDetailAuction.do?id="+id,detailAuction,false);
    	}
   	}
	
	function refreshElement(levelName, elementFieldName){
		if(levelName=="Variety")
			loadVarietyList();
		else if(elementFieldName=="SpecificCoin_CatalogNumber")
			loadCoinCatalogNumberList();			
	}
	
	function loadCoinCatalogNumberList(){
		writeLoadingInfo("tdCoinCatalogNumberList");
    	sendHttpRequest("./specificCoinCatalogNumberList.do?specificCoinId=" + getElementById("elementId").value, showCoinCatalogNumberList,false);
   	}
   	function showCoinCatalogNumberList(httpRequest){
   		if(isHttpRequestReady(httpRequest)){
			setControlContent("tdCoinCatalogNumberList", httpRequest.responseText);
		}
   	}
	function loadCoinList(){
		writeLoadingInfo("tdCoinList");
    	sendHttpRequest("./coinList.do?specificCoinId=" + getElementById("elementId").value, showCoinList,false);
   	}
   	function showCoinList(httpRequest){
   		if(isHttpRequestReady(httpRequest)){
			setControlContent("tdCoinList", httpRequest.responseText);
		}
   	}
	
	function loadVarietyList(){
		writeLoadingInfo("tdVarietyList");
    	sendHttpRequest("./varietyList.do?specificCoinId=" + getElementById("elementId").value, showVarietyList,false);
   	}
   	function showVarietyList(httpRequest){
   		if(isHttpRequestReady(httpRequest)){
			setControlContent("tdVarietyList", httpRequest.responseText);
		}
   	}
   	function clientOnLoad(){		
		loadVarietyList();
		loadCoinList();
		loadCoinCatalogNumberList();
		ShowThisPriceChart();
		loadCompAuctionList();
	}
	function showCatalogNumberDef(coinCSId){
		ShowSpecificCoinDef('SpecificCoin_CatalogNumber', coinCSId);
	}
	function ShowSpecificCoinDef(elementField, coinCSId){
		var url = "./specificCoinDef.do?changeAction=Modify&elementId=" + document.all("elementId").value+"&elementField="+elementField;
		if(coinCSId!=null)
			url = appendQueryString(url, "coinCSId=" + coinCSId);
		OpenInsetPage(500,200, url);
	}
	function ShowVarietyDef(){
		OpenInsetPage(500,200,"./varietyDef.do?changeAction=Create&specificCoinId=" + document.all("elementId").value);
	}
	function TagClick(tagText){
		getElementById("hidTagText").value =tagText;
		formMain.action="./tagSearch.do";
		formMain.submit();		
	}
   	function specificCoinDel_onClick(){
		OpenInsetPage(500,200,"./specificCoinDel.do?elementId=" + document.all("elementId").value);
	}
	function ShowPriceChart(){
		formMain.action="specificCoinPriceLoad.do?SpecificCoinId=" + document.all("elementId").value;
		formMain.submit();
	}
	function ShowThisPriceChart(){
		setControlContent("detailAuctionSpace", "");
		sendHttpRequest("./getRandom.do",showPriceChartCallBack,false);
	}
   	function showPriceChartCallBack(httpRequest){
   		getElementById("tdPriceChart").style.display="block";
		getElementById("tdNoAuction").style.display="none";
   		if(isHttpRequestReady(httpRequest)){
   			var oldReportName = getElementById("reportName").value;
			getElementById("reportName").value = httpRequest.responseText;
			var url="./specificCoinPriceChart.do?AuctionSourceId="+checkboxStat()+"&auctionSold="+getAuctionSold()+"&tempurl="+document.getElementById("reportName").value+"&SpecificCoinId="+document.all("elementId").value+"&begin="+document.getElementById("begin").value
				+"&end="+document.getElementById("end").value+"&rate="+document.getElementById("rate").value + "&oldReportName=" + oldReportName;
   			document.getElementById("winPriceChart").src=appendQueryString(url, "time=" + (new Date()).getMilliseconds());
   		}
   	}
   	function checkboxStat(){
   		var chackstate="";
   		var aSource=document.getElementsByName("auctionSource");
   		for (var i=0; i<aSource.length; i++)
    	{
      		if (aSource[i].checked){
      			if(chackstate != ""){
      				chackstate+=","
      			}
      			chackstate+=aSource[i].value;      			
      		}
    	}
    	if(chackstate == ""){
    		for(var i=0;i<aSource.length;i++){
    			aSource[i].checked = true;
    			if(chackstate != ""){
      				chackstate +=","
      			}
				chackstate += aSource[i].value
    		}			
		}
    	return chackstate;
  	}
  	function getAuctionSold(){
   		var soldInfo="";
   		var aSold=document.getElementsByName("auctionSold");
   	 	for (var i=0; i<aSold.length; i++)
    	{
      		if (aSold[i].checked){
      			if(soldInfo != ""){
      				soldInfo+=","
      			}
      			soldInfo+=aSold[i].value;      			
      		}
    	}
    	if(soldInfo == ""){
			aSold[0].checked = true;
			soldInfo = aSold[0].value
		}
    	return soldInfo;
  	}
  	function detailAuction(httpRequest){
   		if(isHttpRequestReady(httpRequest))
			setControlContent("detailAuctionSpace", httpRequest.responseText);
   	}
   	function deleteTempFile(){
	  	var deleteFile="./deleteTempFile.do?reportName="+document.getElementById("reportName").value;
	  	sendHttpRequest(deleteFile,null,false);
  	}
  	function ShowModifyAuction(auctionId){
		OpenInsetPage(500,200,"./modifyAuction.do?auctionId="+auctionId,900,200);
	}
