/////////////
   function copyUrl()
   { 
		var clipBoardContent=this.location.href; 
		window.clipboardData.setData("Text",clipBoardContent); 
		alert("复制成功!"); 
   } 
	//加入收藏
	function AddFavorite(sURL,sTitle)
	{
		try
		{
			window.external.addFavorite(sURL,sTitle);
		}
		catch (e)
		{
			try
			{
				window.sidebar.addPanel(sTitle,sURL,"");
			}
			catch (e)
			{
				alert("加入收藏失败，请使用Ctrl+D进行添加");
			}
		}
	}
			///////////////////////行情图片/////////////////////
	function ChangeHqImg(obj,nIndex)
	{
		for( var i=1;i<=5;i++)
		{
			if( nIndex != i ){
				var o = document.getElementById('t'+i);
				o.style.cssText = 'color:#073A95';
				o.className = 'PicNur';
			}
		}
	    var imgname = "lushi" + nIndex +".jpg";
		//var sText = "<img src=\"/NewWeb/images/lushi" + nIndex + ".jpg\" width=\"163\" height=\"139\" />";
		var sText = "";
		if(nIndex==1) 
		    sText="<img src=\"http://www.cf8.com.cn/hqpic/"+ "sh_000001.png" + "\" width=\"163\" height=\"139\" />";
		if(nIndex==2) 
		    sText="<img src=\"http://www.cf8.com.cn/hqpic/"+ "sz_399001.png" + "\" width=\"163\" height=\"139\" />";
		if(nIndex==3) 
		    sText="<img src=\"http://www.cf8.com.cn/hqpic/"+ "sh_000003.png" + "\" width=\"163\" height=\"139\" />";
		if(nIndex==4) 
		    sText="<img src=\"http://www.cf8.com.cn/hqpic/"+ "sz_399003.png" + "\" width=\"163\" height=\"139\" />";
		if(nIndex==5) 
		    sText="<img src=\"http://www.cf8.com.cn/hqpic/"+ "sh_000300.png" + "\" width=\"163\" height=\"139\" />";
		document.getElementById('Hq_Img').innerHTML = sText;
		
	    //var z = "t" + oo;
	    //obj.style.cssText = 'font_12_b_red';
        //oo.style.cssText = 'color:#CCC';
        
		obj.className = 'PicCur';
		//obj.style.cssText = 'color:red';
	    //oo = obj;
	}
	//////////////////////////SOSO滑动窗口////////////////////
	function changesearch(name,dq)
	{
	/*	for(i=1;i<=n;i++)
		{
			var mn=document.getElementById(name+i);
			var cont=document.getElementById("my"+name+"_"+i);
			// mn.className=i==dq?"hv":"";
			cont.style.display=i==dq?"block":"none";
		}
		*/
			for(var s=1;s<=3;s++){
				var id = "s" + s;
				var sid = document.getElementById(id);
				var gs = document.getElementById("gs"+s);
				if(id != name.id){
					sid.className = 'HeaderNur';
					gs.style.display = "none";
				}else{
					sid.className = 'HeaderCur';
					gs.style.display = "block";
				}
			}
	}
	///////////////////个股查询////////////////////////////////
	function checkfrm()
    {
        return;
    }
	////////////
	function CheckStockCode(phone)
	{
		var Letters = "0123456789()+-";
		if(phone.length!=6) return false;
		if(phone.charAt(0)!=6) return false;
		for (i=0; i< phone.length; i++)
		{
			var CheckChar = phone.charAt(i);
			if (Letters.indexOf(CheckChar) == -1)
			{
				return false;
			}
		}
		return true;
	}	
	function chkinput(form) 
	{
        if(form.keyword.value=="")
        {
            alert("股票代码不允许为空！");
            form.keyword.focus();
            return;
        }
		else if(!CheckStockCode(form.keyword.value))
		{
            alert("请输入正确的上海股票代码，不接受拼音缩写，请重新填写！");
            form.keyword.focus();
            return;
		}
		
		var previewWindow = window.open("","colReport","resizable=yes, scrollbars=1,status=1,toolbar=0,left=100, top=70");
		form.target= "colReport"; 
		
		//form.target = "_blank";
		form.submit();
	} 
	function chkinput_soso(form) 
	{
        if(form.scode.value=="")
        {
            alert("股票代码不允许为空！");
            form.scode.focus();
            return;
        }
		else if(!CheckStockCode(form.scode.value))
		{
            alert("请输入正确的上海股票代码，不接受拼音缩写，请重新填写！");
            form.scode.focus();
            return;
		}		
		form.target = "_blank";
		form.submit();
	} 
	
	