var j = jQuery.noConflict();
var showadbox = function(boxad11id, tipheight) {
        if(!boxad11id) boxad11id='boxad11';
        if(!tipheight) tipheight=150;

        var objclientheigth = document.getElementById(boxad11id).clientHeight;
        j('#'+boxad11id).height(objclientheigth+2);
        if(objclientheigth < tipheight) { 
                setTimeout(function(){showadbox(boxad11id, tipheight)}, 5);
        }
}
var closead11adbox = function(boxad11id) {
        if(!boxad11id) boxad11id='boxad11';
        var objclientheigth = document.getElementById(boxad11id).clientHeight;
        j('#'+boxad11id).height(1);
        if(objclientheigth<=1) {
                j('#'+boxad11id).hide();
        }        
}
var zoomad11InBox = function(boxad11id) {
        if(!boxad11id) boxad11id='boxad11';
        var objclientheigth = document.getElementById(boxad11id).clientHeight;
        j('#'+boxad11id).height(30);
}
var zoomad11OutBox = function(boxad11id, tipheight) {
        if(!boxad11id) boxad11id='boxad11';
        if(!tipheight) tipheight=150;
        var objclientheigth = document.getElementById(boxad11id).clientHeight;
        j('#'+boxad11id).height(objclientheigth+2);
        if(objclientheigth < tipheight) {
                setTimeout(function(){zoomad11OutBox(boxad11id, tipheight)},5);        
        }        
}
j(function(){
		if(document.getElementById("boxad11")){
			if(j.browser.msie) {
					var tipheight = 150;
			} else {
					var tipheight = 150;
			}
			if(j.cookie('hasshow') != 1) {
					j('#boxad11').show();
					showadbox('boxad11', tipheight);        
			}
			j('#closead11').click(function(){
					closead11adbox('boxad11');
					j.cookie('hasshow', 1);
			});
			j('#zoomad11').click(function(){
				if(document.getElementById('boxad11').clientHeight >= tipheight) { 
					zoomad11InBox('boxad11');
					j('#zoomad11').attr("title", "");
					j('#zoomad11 img').attr("src", "Asset/images/kai.jpg");
				} else {
					zoomad11OutBox('boxad11', tipheight);
					j('#zoomad11').attr("title", "");
					j('#zoomad11 img').attr("src", "Asset/images/xiao.jpg");
				}
			});
		}
});

