

function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));  }

function FixCookieDate (date) {
  var base = new Date(0);
  var skew = base.getTime(); // dawn of (Unix) time - should be 0
  if (skew > 0)  // Except on the Mac - ahead of its time
    date.setTime (date.getTime() - skew);  }

function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
	i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break; }
  return null;   }  

//  assign expiration date variable for cookie

var expdate = new Date ();
FixCookieDate(expdate); 
expdate.setTime(expdate.getTime() + (5 * 60 * 1000)) // 5 minutes  

//  initialize countimg variable to track images
countimg = (GetCookie("countimg") != null) ? (GetCookie("countimg")-1) : -1
countimg = (countimg <-1) ? -1 : countimg
IMGArray = new Array(8)

if (document.images) {
	IMGArray[0] = new Image(205,56)
	IMGArray[1] = new Image(205,56)
	IMGArray[2] = new Image(205,56)
	IMGArray[3] = new Image(205,56)
	IMGArray[4] = new Image(205,56)
	IMGArray[5] = new Image(205,56)
	IMGArray[6] = new Image(205,56)
	IMGArray[7] = new Image(205,56)
	IMGArray[8] = new Image(205,56)
}

//	Old browsers get an array of empty strings

else 
  {
		IMGArray[0] = ""
		IMGArray[1] = ""
		IMGArray[2] = ""
		IMGArray[3] = ""
		IMGArray[4] = ""
		IMGArray[5] = ""
		IMGArray[6] = ""
		IMGArray[7] = ""
		IMGArray[8] = ""
	}
<!-- 改变下面的三个图像的地址及相应的链接地址-->

IMGArray[0].src = "http://seminar.eccn.com/pic/nxp_580x60_100624.jpg"
IMGArray[0].URL = "http://seminar.eccn.com/100624p/register.asp"
IMGArray[0].target = "_blank"

IMGArray[1].src = "http://seminar.eccn.com/pic/Ti_580x60_100702.jpg"
IMGArray[1].URL = "http://seminar.eccn.com/100702/register.asp"
IMGArray[1].target = "_blank"

IMGArray[2].src = "http://seminar.eccn.com/pic/nxp_580x60_100708.jpg"
IMGArray[2].URL = "http://seminar.eccn.com/100708p/register.asp"
IMGArray[2].target = "_blank"

IMGArray[3].src = "http://seminar.eccn.com/pic/silicon_580x60_100907.jpg"
IMGArray[3].URL = "http://seminar.eccn.com/100907/register.asp"
IMGArray[3].target = "_blank"

IMGArray[4].src = "http://seminar.eccn.com/pic/adi_580x60_100909.gif"
IMGArray[4].URL = "http://seminar.eccn.com/100909/register.asp?src=banner"
IMGArray[4].target = "_blank"

IMGArray[5].src = "http://seminar.eccn.com/pic/infineon_580x60_100914.jpg"
IMGArray[5].URL = "http://seminar.eccn.com/100914/register.asp"
IMGArray[5].target = "_blank"

IMGArray[6].src = "http://seminar.eccn.com/pic/honeywell_580x60_100916.jpg"
IMGArray[6].URL = "http://seminar.eccn.com/100916/register.asp"
IMGArray[6].target = "_blank"

IMGArray[7].src = "http://seminar.eccn.com/pic/xilinx_580x60_100920.gif"
IMGArray[7].URL = "http://seminar.eccn.com/100920/register.asp"
IMGArray[7].target = "_blank"

IMGArray[8].src = "http://seminar.eccn.com/pic/secomtel_580x60_101021.jpg"
IMGArray[8].URL = "http://seminar.eccn.com/101021/register.asp"
IMGArray[8].target = "_blank"

function updateIM(countimg) { return countimg; }

//  functions for onMouseOver, onMouseOut, onClick event handlers

function Overhref2() { updateIM(countimg)
	if (IMGArray[countimg] != null ) { 
	window.status = IMGArray[countimg].URL; return true; }}

function Outhref2() { window.status = ""; return true; }

function clickhref2() { updateIM(countimg)
	if (IMGArray[countimg] != null ) { 
	
	//window.location = IMGArray[countimg].URL 
	window.open(IMGArray[countimg].URL );
	
	}
	}

//  Image swapping function

function showIMAGE() { updateIM(countimg++)

if (document.images) {

//	Make sure countimg does'nt get too big

	if ( countimg > IMGArray.length - 1 ) { countimg = IMGArray.length - IMGArray.length }

	//document.images.banner.src = IMGArray[countimg].src 
	
	document.all.banner_seminar.src = IMGArray[countimg].src 
	exbannerID = setTimeout("showIMAGE()",5000) }
	
	}


function setIt2() { updateIM(countimg)
	document.cookie = "countimg=" + countimg + "; expires=" + expdate.toGMTString()  }

//  get cookie countimg onblur, onload

function getIt2() { 
	countimg = (GetCookie("countimg") != null) ? (GetCookie("countimg")) : 0
	updateIM(countimg)
	if (exbannerID != null) { clearTimeout(exbannerID); showIMAGE() }}

function initCOOKIES() {

window.onunload = setIt2
window.onfocus = getIt2
window.onblur = setIt2 	}

function initBANNER() {

	showIMAGE() 

	cookieID = setTimeout("initCOOKIES()",5000) 
}
   
 
//window.onload = initBANNER


 
document.write("<a href='#'  onclick='clickhref2()' onmouseover='Overhref2();return true;' onmouseout='Outhref2;return true;'><img src='http://seminar.eccn.com/pic/091120.jpg'  id=banner_seminar name=banner_seminar  width='580' height='60' border='0'/></a>")


initBANNER();
 
  


