
//更换图片的大小
function ResetImageSize(image){
	var maxWidth = 760;
	if(image.width > maxWidth){
		image.width = maxWidth;
		image.height= image.height * (maxWidth / image.width);
	}
}

//显示在首页的广告
function showIndex_Adver(index,path){
	switch(index){
		case "top":
			ShowIFrame("http://gz.vnet.cn/userPortal/vnetFile/newhead778.jsp","100%","111");
			break;
		case "menu":
			ShowIFrame("/adver/blue_menu.html","100%","80");
			document.write('<script src="http://www.cesuan.com.cn/jsgg/banner2_ny.js"></script>');
			break;
		case "foot":
			ShowIndex_Foot();
			break;
	}
}

function showList_Adver(index){
		switch(index){
		case "left":
			document.write('<script src="http://www.cesuan.com.cn/jsgg/left_ny.js"></script>');
			break;
		case "top":
			document.write('<script src="http://www.cesuan.com.cn/jsgg/top_ny.js"></script>');
			break;
		case "bottom":
			document.write('');
			break;
	}
}
/*<script src="http://www.cesuan.com.cn/jsgg/bottom_ny.js"></script>*/

function showDetail_Adver(index){
	switch(index){
		case "right_bottom":
			document.write('<script src="http://www.cesuan.com.cn/jsgg/right_ny.js"></script>');
			break;
		case "top":
			document.write('<script src="http://www.cesuan.com.cn/jsgg/top2_ny.js"></script>');
			break;
		case "bottom":
			document.write('');
			break;

	}
}
/*<script src="http://www.cesuan.com.cn/jsgg/bottom_ny.js"></script>*/


//显示版权
function ShowIndex_Foot(){
document.writeln("<iframe width=776 height=145 src=\'http:\/\/gz.vnet.cn\/userPortal\/footnew.htm\' name=foot marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=\"middle\"> <\/iframe>");
	//document.write('<script src="http://www.cesuan.com.cn/adver/1518fav.js"><script>');
}

function ShowIFrame(src,width,height){
			document.write('<iframe marginwidth="0" marginheight="0" frameborder="0" scrolling="no" src="' + src + '" width="' + width + '" height="' + height + '"></iframe>');
}


//提交心理测试的数据
function submitResult(text){
   var fmResult = document.getElementById("fmResult");
   if(fmResult == undefined)return;
   var result = document.getElementById("result");
   if(result == undefined)return;
   result.value = text;
   fmResult.target = "_blank";
   fmResult.action = message_path + "showresult.aspx";
   fmResult.submit();
}