function alertDivObjValue(type, objId, title){var obj = document.getElementById(objId);if (obj != null) {alertDiv(type, obj.value, title);}}
function alertDivObjInnerHtml(type, objId, title){ 
	var obj = document.getElementById(objId);
	if (obj != null) {alertDiv(type, obj.innerHTML, title);}
}
function alertDiv(type, content, title){
	var tempTop = document.documentElement.scrollTop;
	var tempLeft = document.documentElement.scrollLeft;
	var bodystyle = document.getElementsByTagName('body')[0];
	var htmlstyle = document.getElementsByTagName('html')[0];
	var boxbackground = document.getElementById("boxbackground");
	var iframebox = document.getElementById("iframebox");
	var boxcontent = document.getElementById("boxcontent");
	//bodystyle.style.height='auto';
	//bodystyle.style.overflow='auto';
	//htmlstyle.style.height='auto';
	if( type == 1 ){
		//bodystyle.style.height='100%';
	///bodystyle.style.overflow='hidden';
	//	htmlstyle.style.height='100%';
		if(navigator.appName == "Opera"){
			var bodyWidth = document.body.clientWidth;
			var bodyHeight = document.body.clientHeight;
			var scrollWidth = document.body.scrollWidth;
			var scrollHeight = document.body.scrollHeight;
		} else {
			var bodyWidth = document.documentElement.clientWidth;
			var bodyHeight = document.documentElement.clientHeight;
			var scrollWidth = document.documentElement.scrollWidth;
			var scrollHeight = document.documentElement.scrollHeight;
		}
		boxcontent.style.display = "block";
		if (content != null) {document.getElementById("message").innerHTML=content;}
		if (title != null) {document.getElementById("title").innerHTML=title;} 
		boxcontent.style.top =tempTop + (bodyHeight - boxcontent.clientHeight)/2 + "px";
		boxcontent.style.left =(((bodyWidth - boxcontent.clientWidth)/bodyWidth)/2)*100 + "%";
		var ua = navigator.userAgent;
		if(ua.indexOf('MSIE 6.0') > -1){
		boxbackground.style.width = scrollWidth;
		iframebox.style.width = scrollWidth;
		}
		if(ua.indexOf('MSIE 6.0') == -1){
			boxbackground.style.height = scrollHeight + tempTop + "px";
		} else {
			boxbackground.style.height = bodyHeight>scrollHeight?bodyHeight:scrollHeight;
		}
		iframebox.style.height = scrollHeight;
		boxcontent.style.display = "block";
		boxbackground.style.display = "block";
		window.scrollTo(0,tempTop);
	}else{
		boxcontent.style.display="none";
		boxbackground.style.display="none";
	}
}
function alertDivObjInnerHtmlShop(type, objId, title){ 
	var obj = document.getElementById(objId);
	if (obj != null) {
		alertDivShop(type, obj.innerHTML, title);
	}
}

function alertDivShop(type, content, title){
		var tempTop = document.documentElement.scrollTop;
		var tempLeft = document.documentElement.scrollLeft;
	//window.scrollTo(0,0);
	var bodystyle = document.getElementsByTagName('body')[0];
	var htmlstyle = document.getElementsByTagName('html')[0];
	var boxbackground = document.getElementById("boxbackground");
	var iframebox = document.getElementById("iframebox");
	var boxcontent = document.getElementById("boxcontent");
	bodystyle.style.height='auto';
	bodystyle.style.overflow='auto';
	htmlstyle.style.height='auto';
	
	if( type == 1 ){
		if(navigator.appName == "Opera"){
			var bodyWidth = document.body.clientWidth;
			var bodyHeight = document.body.clientHeight;
			var scrollWidth = document.body.scrollWidth;
			var scrollHeight = document.body.scrollHeight;
		} else {
			var bodyWidth = document.documentElement.clientWidth;
			var bodyHeight = document.documentElement.clientHeight;
			var scrollWidth = document.documentElement.scrollWidth;
			var scrollHeight = document.documentElement.scrollHeight;
		}
		boxcontent.className="boxorg";
		document.getElementById("message").className="snotice";
		document.getElementById("shopb").className="boxorglist";
		boxcontent.style.display = "block";
			
		if (content != null) {
			document.getElementById("message").innerHTML=content;
		}
		if (title != null) { 
			document.getElementById("title").innerHTML=title;
		} 
		boxcontent.style.top =tempTop + (bodyHeight - boxcontent.clientHeight)/2 + "px";
		boxcontent.style.left =(((bodyWidth - boxcontent.clientWidth)/bodyWidth)/2)*100 + "%";
		//boxcontent.style.top =(((bodyHeight - boxcontent.clientHeight)/bodyHeight)/2)*100 + "%";
		//boxcontent.style.left =(((bodyWidth - boxcontent.clientWidth)/bodyWidth)/2)*100 + "%";
	
		var ua = navigator.userAgent;
		boxbackground.style.height = scrollHeight;
		iframebox.style.height = scrollHeight;
		
		boxcontent.style.display = "block";
		boxbackground.style.display = "block";
		window.scrollTo(0,tempTop);
	}else{
		boxcontent.style.display="none";
		boxbackground.style.display="none";
	}
}

document.write('<div id="boxcontent">');
document.write('<div class="boxframe" id="shopb">');
document.write('<h4><strong id="title"></strong><a href="javascript:void(0)" onclick="alertDiv(0)" title="关闭" id="closed">关闭</a></h4>');
document.write('<div class="bfList" id="message">');
document.write('</div></div>');
document.write('</div>');
document.write('<div id="boxbackground"><iframe id="iframebox" frameborder="0" src=""></iframe></div>');

var sobj=null;
var LOADING=new Image();
LOADING.src="http://static.chinaeasy.com/images/home/loading_1.gif";
var PICIMG=new Image();
function showbigpic(obj,ctype,pic,title,content,pleft){
	var show=document.getElementById("bigdetail");
	if (sobj!=obj){
	if (show==null){
		show = document.createElement("DIV");
		show.id="bigdetail"
	  show.className="imgbox";
		show.zIndex="20001";
	  document.body.appendChild(show);
	}
	show.style.top=(getAbsoluteTop(obj))+"px";
	var s="";
	if (ctype=="all" ){
		 if(content=="" &&  pic.indexOf("/images/website/shop/nopic.gif")==-1){
			s='<div class="ibimg" id="itempicture"><div><p><img id="shoppic" src="'+LOADING.src+'" alt="" /></p></div></div><div class="boxjt"></div>';
		}else{
			s='<div class="ibimg" id="itempicture"><div><p><img id="shoppic" src="'+LOADING.src+'" alt="" /></p></div></div><div class="ibcon" id="itemnamed"><h3>'+title+'</h3>  <p>'+content+'</p></div><div class="boxjt"></div>';
		}
	}else{
		s='<div class="ibimg" id="itempicture"><div><p><img id="shoppic" src="'+LOADING.src+'" alt="" /></p></div></div><div class="boxjt"></div>';
	}	
	show.style.left=(pleft==null?(getAbsoluteLeft(obj)+getAbsoluteWidth(obj)+10):pleft)+"px";
	show.innerHTML=s;
//	show.onmouseover=function(){
//	  	show.innerHTML="aaa";
//	  }
	sobj=obj;
	}
		if(content=="" && pic.indexOf("/images/website/shop/nopic.gif")>-1){
			show.style.display="none";
		}else{
			show.style.display="block";
		}
		PICIMG.src=pic;
	  document.getElementById("shoppic").src=PICIMG.src;
}

function getAbsoluteWidth(ob){ 
return ob.offsetWidth 
} 
function getAbsoluteLeft(ob){ 
var s_el=0;el=ob;while(el){s_el=s_el+el.offsetLeft;el=el.offsetParent;}; return s_el 
} 
function getAbsoluteTop(ob){
 var s_el=0;el=ob;while(el){s_el=s_el+el.offsetTop;el=el.offsetParent;} return s_el 
}
