function ChangeSize(index)
{
	if(index==1)
	{
		document.getElementById("content").style.fontSize =12+"px"
	}
	else
	{
		document.getElementById("content").style.fontSize =14+"px"
	}
}
function SelectImg(id,obj,url)
{
	var objlist=document.getElementById("ImgList").getElementsByTagName("img");
	for(var i=0;i<objlist.length;i++)
	{
		objlist[i].className=""
	}
	obj.className="Select"
	document.getElementById("HotelLike").href="news_view.asp?NewsId="+id+""
	document.getElementById("HotelImg").src=url
}
function Selebg(index,path)
{
	document.getElementById("SelectImg"+index).src="images/imgList/"+path+"/select/"+index+".gif"
}
 
function ShowBook()
{
	if (document.getElementById("Book").className=="")
	{
		document.getElementById("Book").className="yin"
	}
	else
	{
		document.getElementById("Book").className=""
	}
}
function showKefu(val)
{
	   val.style.display = 'none';
	   document.getElementById("a").style.display='';
}
function closekf()
{
	document.getElementById("e").style.display = '';
	document.getElementById("a").style.display = 'none';
}
//滚动代码开始
function qqshow(){
 
if (document.body.offsetWidth >900) {
    if (document.getElementById("qq_right") != null) {
        document.getElementById("qq_right").style.top = (document.documentElement.scrollTop + 30) + "px";
    }
    else { return false }
}
else
{
 document.getElementById("qq_right").style.display="none";
}
}
function showqq(){
setTimeout("qqshow();",10);
}
window.onscroll=showqq;
window.onresize=qqshow;
window.onload=qqshow;
function fullScreen(){
 this.moveTo(0,0);
this.outerWidth=screen.availWidth;
this.outerHeight=screen.availHeight;
}
window.maximize=fullScreen;

function changesize(stylename) {
    document.getElementById("content").className = stylename;
}

function GoToShoppingCart() {
        var cartForm = window.open(applicationPath + "/ShoppingCart.aspx", "ShoppingCart");
        if (cartForm != null && !cartForm.closed) cartForm.focus();
    }
 
function LoadVote(index,id)
{ 
 
	var Url="GetVote.asp"
	$.ajax({ 
        type: "get",
        url: Url,
        data: "id="+id+"&index="+index+"&tmp="+Math.random()+"",
        success: function(data)
		{ 
         	$("#vote"+index).html(data) 
	    }
    });
}
function Addvote(index,id)
{
	 
	var Url="addVote.asp"
	$.ajax({ 
        type: "get",
        url: Url,
        data: "id="+id+"&index="+index+"&tmp="+Math.random()+"",
        success: function(data)
		{ 
           
	    }
    });
	LoadVote(index,id)
}
function SetBq(i)
{
	
	var objText=document.getElementById("txtContent");
	 
	var range;
     objText.focus();
     range = document.selection.createRange();
     range.moveStart("character", -1);
     range.select();
     if(range.text.length == 0)
     {
		 objText.value = objText.value + "{R:"+i+"}";
		  
     }
     else
     {
         range.text = range.text + "{R:"+i+"}";
      }
      objText.focus();
}

function Shopbq(index)
{	
	
	if(index==0)
	{
		document.getElementById("Bqbox").className="BqImgboxShow"
		document.getElementById("bqText").innerHTML="<a href=\"javascript:Shopbq(1)\">收起表情↑</a>"
	}
	else
	{
		
		document.getElementById("Bqbox").className="BqImgbox"
		document.getElementById("bqText").innerHTML="<a href=\"javascript:Shopbq(0)\">更多表情↓</a>"
	}
 
}
function copyToClipBoard(){ 
var clipBoardContent=document.location; 
clipBoardContent+='\r\n'; 
window.clipboardData.setData("Text",clipBoardContent); 
alert("复制成功！您可以粘贴在QQ消息里送给您的好朋友！"); 
}
function SetSize(obj,width,height) 
{ 
    myImage = new Image(); 
    myImage.src = obj.src; 
	
    if (myImage.width>0 && myImage.height>0) 
    { 
        var rate = 1; 
        if (myImage.width>width || myImage.height>height) 
        { 
            if (width/myImage.width<height/myImage.height) 
            { 
               rate = width/myImage.width; 
            } 
            else 
            { 
               rate = height/myImage.height; 
            } 
			
        } 
       obj.width = myImage.width*rate; 
       obj.height = myImage.height*rate;       
    } 
} 
function SelectIamge(index,count,obj)
{
	for(var i=1;i<=count;i++)
	{
		if(document.getElementById("ImgBox"+i)!=null && document.getElementById("Content"+i)!=null)
		{
			if(index==i)
			{
				obj.parentNode.className="SelectBorder"
				document.getElementById("Content"+i).className=""
				
			}
			else
			{
				document.getElementById("ImgBox"+i).className="borderE8E8E8"
				document.getElementById("Content"+i).className="yin"
			}
			
		}
	}
}
function SelectIamgeList(ClassId,domId)
{
	var obj=document.getElementById("ImgBox"+ClassId).getElementsByTagName("td");
	
	for(var i=0;i<obj.length;i++)
	{
		
		if(obj[i].id==domId)
		{ 
			obj[i].className="SelectBorder"
			if(document.getElementById("td"+obj[i].id)!=null)
			{
				document.getElementById("td"+obj[i].id).className=""
			}
		}
		else
		{
			if(document.getElementById("td"+obj[i].id)!=null)
			{
				obj[i].className="borderE8E8E8"
				document.getElementById("td"+obj[i].id).className="yin"
			}
		}
	}
}

 <!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
 
