DI_sLeftImageUrl	= "http://www.gukenet.cn/webad/year_left.jpg";
DI_sRightImageUrl	= "http://www.gukenet.cn/webad/year_right.jpg";
DI_sClickUrl		= "http://www.gukenet.cn/gukeblog/conference_list.html";
DI_sImageUrl		= "";


DI_iImageWidth=parseInt("101");

DI_iImageHeight	= parseInt("280");

doubleimage_top	= 10;
doubleimage_left = 10;
doubleimage_right = 10;

window_width_min = 800 + DI_iImageWidth * 2;

time_out = 500;
scrollbar_width = 20;
document.ns = navigator.appName == "Netscape";

DI_blClosed = false;

function closead()
{
	DI_blClosed = true;
	DI_Hide();
}

function DI_Hide()
{
	DI_LeftDiv.style.visibility='hidden';
	DI_RightDiv.style.visibility='hidden';
}

function DI_Show()
{
	if (DI_blClosed) return;
	DI_LeftDiv.style.visibility='visible';
	DI_RightDiv.style.visibility='visible';
}

function DI_ShowContent(ImageUrl, ImageName, iWidth, iHeight)
{
	var str, pos;
	var sSrc = ImageUrl;
	if (ImageUrl!="")
	{
		//image not played by adverisement system
		sSrc = ImageUrl;
	}
	else
	{
		//image played by adverisement system
		sSrc = ImageName;
	}

	str = /.swf/;
	pos = sSrc.search(str);
	if (pos==-1)
		document.write("<img src=\'", sSrc, "\' height=\'" + iHeight + "\' width=\'" + iWidth + "\' border=0>");
	else
		document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" height=",  iHeight, " width=", iWidth,">\n<param name=movie value=\'", sSrc,"\'>\n<param name=quality value=high>\n\n</object>");	
}

function DI_Load()
{
	if (DI_sLeftImageUrl == "Tencent QQ")
	{
		return ;
	}

	if (document.ns)
	{
		document.write("<layer id=DI_LeftDiv top=",doubleimage_top," width=50 height=150><a href='",DI_sClickUrl,"' target=_blank>");
		DI_ShowContent(DI_sLeftImageUrl);
		document.write("</a></layer>");
		
		document.write("<layer id=DI_RightDiv top=",doubleimage_top," width=50 height=150><a href='",DI_sClickUrl,"' target=_blank>");
		DI_ShowContent(DI_sRightImageUrl);
		document.write("</a></layer>");
	}
	else
	{
		document.write("<div id=DI_LeftDiv style='position: absolute;visibility: visible;z-index: 1'><iframe src='http://www.gukenet.cn/webad/iframeAD.asp?ctrl=conADleft' frameborder='0' height='200' width='100' scrolling='no' style='margin:0px'>");
		DI_ShowContent(DI_sImageUrl, DI_sLeftImageUrl, DI_iImageWidth, DI_iImageHeight);
		document.write("</iframe></div>");
		
		document.write("<div id=DI_RightDiv style='position: absolute;visibility: visible;z-index: 1'><iframe src='http://www.gukenet.cn/webad/iframeAD.asp?ctrl=conADright' frameborder='0' height='200' width='100' scrolling='no' style='margin:0px'>");
		DI_ShowContent(DI_sImageUrl, DI_sRightImageUrl, DI_iImageWidth, DI_iImageHeight);
		document.write("</iframe></div>");
	}
	
	DI_Move();
}


function DI_Move()
{
	if (document.body.offsetWidth < window_width_min)
	{
		DI_Hide();
		setTimeout("DI_Move();", time_out);
		return;
	}

	DI_Show();
	
	if (document.ns)
	{
		document.DI_LeftDiv.pageX		= doubleimage_left;
		document.DI_LeftDiv.pageY		= doubleimage_top;

		document.DI_RightDiv.pageX	= window.innerWidth - DI_iImageWidth - doubleimage_left - scrollbar_width;
		document.DI_RightDiv.pageY	= doubleimage_top;
	}
	else
	{
		DI_LeftDiv.style.top		= doubleimage_top;
		DI_LeftDiv.style.left		= doubleimage_left;
		
		DI_RightDiv.style.top		= doubleimage_top;
		DI_RightDiv.style.left	= document.body.offsetWidth - DI_iImageWidth - doubleimage_left - scrollbar_width;
	}

	setTimeout("DI_Move();", time_out);
}

//-- start

DI_Load();

//-- end

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


