﻿// JavaScript Document
function RectChange(id,cur,len,canshu) {
  for(i=1;i<=len;++i)
  {
	  document.getElementById(id + "A" +i).style.display='none';
	   document.getElementById(id + "B" +i).className='';
  }
  document.getElementById(id + "A" +cur).style.display='';
  //rxA1;
   document.getElementById(id + "B" +cur).className=canshu;
} 

    function doZoom(size)
    {
	    document.getElementById('zoom').style.fontSize=size+'px'
    }

// JavaScript Document
function RectChange(id,cur,len,canshu) {
  for(i=1;i<=len;++i)
  {
	  document.getElementById(id + "A" +i).style.display='none';
	   document.getElementById(id + "B" +i).className='';
  }
  document.getElementById(id + "A" +cur).style.display='';
  //rxA1;
   document.getElementById(id + "B" +cur).className=canshu;
} 
function $1(id)
{
	return document.getElementById(id).value;
	}
function checkForm()
{
		if($1("title")=="")
		{
			alert("标题不能为空");
			return false;
			}
			if($1("txtContent")=="")
			{
					alert("内容不能为空");
					return false;
				}
			if($1("name")=="")
			{
					alert("留言者不能为空");
					return false;
				}
	}




<!-- 
         var delta=0.15;
var collection;
var intervalPlay;
function floaters() {
	this.items	= [];
	this.addItem = function(id,x,y,content){
						if (x > 0){
							x += 5;
							document.write('<DIV align="left" id='+id+' style="Z-INDEX: 10; POSITION: absolute;  width:100px; height:100px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+content+'</DIV>');
						}else{
							x -= 25;
							if(y<0){
								document.write('<DIV align="right" id='+id+' style="Z-INDEX: 10; POSITION: absolute;  width:100px; height:100px;left:'+(typeof(x)=='string'?eval(document.body.clientWidth+x):document.body.clientWidth+x)+';top:'+(typeof(y)=='string'?eval(document.body.clientHeight+y):document.body.clientHeight+y)+'">'+content+'</DIV>');
							}else{
								document.write('<DIV align="right" id='+id+' style="Z-INDEX: 10; POSITION: absolute;  width:100px; height:100px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+content+'</DIV>');
							}
						}
						var newItem = {};
						newItem.object = document.getElementById(id);
						newItem.x = x;
						newItem.y = y;
						this.items[this.items.length] = newItem;
					}
	this.play	=	function(){
						    collection = this.items;
						    for(var i=0;i<collection.length-1;i++){
		                        var followObj		= collection[i].object;
		                        followObj .style.display='';
		                    }
		                    collection [collection .length -1].object.style.display='none';
						    intervalPlay=setInterval('play()',10);
						}
    this.stop   =function ()
                    {
                     	for(var i=0;i<collection.length-1;i++){
		                    var followObj		= collection[i].object;
		                    followObj .style.display='none';
		                }
                        collection [collection .length -1].object.style.display='';
                    }

}


function play(){
     
     
     
	for(var i=0;i<collection.length;i++){
		var followObj		= collection[i].object;
		if (collection[i].x>=0){
			var followObj_x		= (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);
		}else{
			var followObj_x		= (typeof(collection[i].x)=='string'?eval(document.body.clientWidth+collection[i].x):document.body.clientWidth+collection[i].x);
		}
		
		if (collection[i].y>=0){
			var followObj_y		= (typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y);
		}else{
			var followObj_y		= (typeof(collection[i].y)=='string'?eval(document.body.clientHeight+collection[i].y):document.body.clientHeight+collection[i].y);
		}
		
		var eleLeft;
		if(document.documentElement)
			eleLeft = document.documentElement.scrollLeft;
		else
			eleLeft = document.body.scrollLeft;

		var eleTop;
		if(document.documentElement)
			eleTop = document.documentElement.scrollTop;
		else
			eleTop = document.body.scrollTop;
		
		

		

		if(followObj.offsetLeft!=(eleLeft+followObj_x)){
			var dx=(eleLeft+followObj_x-followObj.offsetLeft)*delta;
			dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));
			followObj.style.left=followObj.offsetLeft+dx;
		}
		
		if(followObj.offsetTop!=(eleTop+followObj_y)){
			var dy=(eleTop+followObj_y-followObj.offsetTop)*delta;
			dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));
			followObj.style.top=followObj.offsetTop+dy;
		}
		
		//followObj.style.display	= '';
	}
}


