$(function(){

	if(getID('pIndex')){
		$('#ProductList').appendTo('#tList')
		var scrollingDiv = new scrollingNEWS("ProductList");
		scrollingDiv.width = 122;
		scrollingDiv.height = 125;
		scrollingDiv.pauseTime = 4000;
		scrollingDiv.size = 124;
		scrollingDiv.move();
	}
	if(getID('pAbout')){
		var scrollingDiv = new scrollingNEWS("ProductList");
		scrollingDiv.width = 200;
		scrollingDiv.height = 310;
		scrollingDiv.pauseTime = 4000;
		scrollingDiv.size = 103;
		scrollingDiv.move();
	}
	if(getID('pMessage')){
		//v_w=(screen.availWidth-450)/2;
		//v_h=(screen.availHeight-350)/2
		//top.window.moveTo(v_w,v_h);
		$('.tBoxCntt textarea').focus();
		$('#xEditingArea').focus();
	}
	if(!getID('pIndex')&&!getID('pMessage')){
		$('#fCntt').append('<img src="/images/messagebox.gif" id="MessageBox"></img>')
	}
	$('#MenuMsge').click(function(){
		showWin('/HTML/Message/Info/200807020107168J80Q64OWI.shtml','no','450','350',(screen.availWidth-450)/2,(screen.availHeight-350)/2);
	})
	$('#MessageBox').click(function(){
		showWin('/HTML/Message/Info/200807020107168J80Q64OWI.shtml','no','450','350',(screen.availWidth-450)/2,(screen.availHeight-350)/2);
	})

	$('#fCntt').append('<div class="clearbox"></div>');
	$('#tCnttC').append('<div class="clearbox"></div>');
});

//判断对象存在
function getID(vobj){
	var vgetID = document.getElementById(vobj);
	if (null != vgetID && vgetID) return true; else return false;
}

function doZoom(size){
	if(size == "in")
	{
		newZoom= parseInt(oZoom.style.zoom)+10+'%';
		oZoom.style.zoom =newZoom;
	}
	if(size == "out")
	{
		newZoom= parseInt(oZoom.style.zoom)-10+'%';
		oZoom.style.zoom =newZoom;
	}
	if(size == "def")
	{
		oZoom.style.zoom = "100%";
	}
}

function showWin(URL,scrbar,w,h,l,t){
 		ff=open(URL,"message","menubar=no,toolbar=no,location=no,status=no,scrollbars="+scrbar+",resizable=no,width="+w+",height="+h+",left="+l+",top="+t)
}

// 生成随机数
// The Central Randomizer 1.3 (C) 1997 by Paul Houle (houle@msc.cornell.edu)
// See: http://www.msc.cornell.edu/~houle/javascript/randomizer.html
rnd.today=new Date();
rnd.seed=rnd.today.getTime();
function rnd() {
	rnd.seed = (rnd.seed*9301+49297) % 233280;
	return rnd.seed/(233280.0);
};
function rand(number) {
	return Math.ceil(rnd()*number);
};
// end central randomizer. -->