MM_preloadImages(
'images/but-register.gif','images/but-register-over.gif','images/but-events.gif','images/but-events-over.gif',
'images/but-partners.gif','images/but-partners-over.gif','images/but-sponsors.gif','images/but-sponsors-over.gif',
'images/but-exhibitors.gif','images/but-exhibitors-over.gif','images/but-getinvolved.gif','images/but-getinvolved-over.gif',
'images/but-media.gif','images/but-media-over.gif'
);


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function showMe(obj) {
	if (document.getElementById(obj).style.display == 'block')
		document.getElementById(obj).style.display = 'none';
		//document.getElementById(obj).style.background-image = 'images/SubPages/but-subMenu_Down.gif';
	else document.getElementById(obj).style.display = 'block';
		//document.getElementById(obj).style.background-image = 'images/SubPages/but-subMenu_Up.gif';
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function YY_checkform() { //v4.71
//copyright (c)1998,2002 Yaromat.com
  var a=YY_checkform.arguments,oo=true,v='',s='',err=false,r,o,at,o1,t,i,j,ma,rx,cd,cm,cy,dte,at;
  for (i=1; i<a.length;i=i+4){
    if (a[i+1].charAt(0)=='#'){r=true; a[i+1]=a[i+1].substring(1);}else{r=false}
    o=MM_findObj(a[i].replace(/\[\d+\]/ig,""));
    o1=MM_findObj(a[i+1].replace(/\[\d+\]/ig,""));
    v=o.value;t=a[i+2];
    if (o.type=='text'||o.type=='password'||o.type=='hidden'){
      if (r&&v.length==0){err=true}
      if (v.length>0)
      if (t==1){ //fromto
        ma=a[i+1].split('_');if(isNaN(v)||v<ma[0]/1||v > ma[1]/1){err=true}
      } else if (t==2){
        rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-zA-Z]{2,4}$");if(!rx.test(v))err=true;
      } else if (t==3){ // date
        ma=a[i+1].split("#");at=v.match(ma[0]);
        if(at){
          cd=(at[ma[1]])?at[ma[1]]:1;cm=at[ma[2]]-1;cy=at[ma[3]];
          dte=new Date(cy,cm,cd);
          if(dte.getFullYear()!=cy||dte.getDate()!=cd||dte.getMonth()!=cm){err=true};
        }else{err=true}
      } else if (t==4){ // time
        ma=a[i+1].split("#");at=v.match(ma[0]);if(!at){err=true}
      } else if (t==5){ // check this 2
            if(o1.length)o1=o1[a[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!o1.checked){err=true}
      } else if (t==6){ // the same
            if(v!=MM_findObj(a[i+1]).value){err=true}
      }
    } else
    if (!o.type&&o.length>0&&o[0].type=='radio'){
          at = a[i].match(/(.*)\[(\d+)\].*/i);
          o2=(o.length>1)?o[at[2]]:o;
      if (t==1&&o2&&o2.checked&&o1&&o1.value.length/1==0){err=true}
      if (t==2){
        oo=false;
        for(j=0;j<o.length;j++){oo=oo||o[j].checked}
        if(!oo){s+='* '+a[i+3]+'\n'}
      }
    } else if (o.type=='checkbox'){
      if((t==1&&o.checked==false)||(t==2&&o.checked&&o1&&o1.value.length/1==0)){err=true}
    } else if (o.type=='select-one'||o.type=='select-multiple'){
      if(t==1&&o.selectedIndex/1==0){err=true}
    }else if (o.type=='textarea'){
      if(v.length<a[i+1]){err=true}
    }
    if (err){s+='* '+a[i+3]+'\n'; err=false}
  }
  if (s!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+s)}
  document.MM_returnValue = (s=='');
}
function GP_AdvOpenWindow(theURL,winName,features,popWidth,popHeight,winAlign,ignorelink,alwaysOnTop,autoCloseTime,borderless) { //v2.0
  var leftPos=0,topPos=0,autoCloseTimeoutHandle, ontopIntervalHandle, w = 480, h = 340;  
  if (popWidth > 0) features += (features.length > 0 ? ',' : '') + 'width=' + popWidth;
  if (popHeight > 0) features += (features.length > 0 ? ',' : '') + 'height=' + popHeight;
  if (winAlign && winAlign != "" && popWidth > 0 && popHeight > 0) {
    if (document.all || document.layers || document.getElementById) {w = screen.availWidth; h = screen.availHeight;}
		if (winAlign.indexOf("center") != -1) {topPos = (h-popHeight)/2;leftPos = (w-popWidth)/2;}
		if (winAlign.indexOf("bottom") != -1) topPos = h-popHeight; if (winAlign.indexOf("right") != -1) leftPos = w-popWidth; 
		if (winAlign.indexOf("left") != -1) leftPos = 0; if (winAlign.indexOf("top") != -1) topPos = 0; 						
    features += (features.length > 0 ? ',' : '') + 'top=' + topPos+',left='+leftPos;}
  if (document.all && borderless && borderless != "" && features.indexOf("fullscreen") != -1) features+=",fullscreen=1";
  if (window["popupWindow"] == null) window["popupWindow"] = new Array();
  var wp = popupWindow.length;
  popupWindow[wp] = window.open(theURL,winName,features);
  if (popupWindow[wp].opener == null) popupWindow[wp].opener = self;  
  if (document.all || document.layers || document.getElementById) {
    if (borderless && borderless != "") {popupWindow[wp].resizeTo(popWidth,popHeight); popupWindow[wp].moveTo(leftPos, topPos);}
    if (alwaysOnTop && alwaysOnTop != "") {
    	ontopIntervalHandle = popupWindow[wp].setInterval("window.focus();", 50);
    	popupWindow[wp].document.body.onload = function() {window.setInterval("window.focus();", 50);}; }
    if (autoCloseTime && autoCloseTime > 0) {
    	popupWindow[wp].document.body.onbeforeunload = function() {
  			if (autoCloseTimeoutHandle) window.clearInterval(autoCloseTimeoutHandle);
    		window.onbeforeunload = null;	}  
   		autoCloseTimeoutHandle = window.setTimeout("popupWindow["+wp+"].close()", autoCloseTime * 1000); }
  	window.onbeforeunload = function() {for (var i=0;i<popupWindow.length;i++) popupWindow[i].close();}; }   
  document.MM_returnValue = (ignorelink && ignorelink != "") ? false : true;
}

//for drop down menu
<!--//--><![CDATA[//><!--
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
//--><!]]>
//end of drop down menu

/**
 * Strips 'space' character from input field value
 * assigns new value
 */
function stripSpaces(field)
{
	field.value = field.value.replace(/\s+/g, '');
}


function getTop(obj) {
	var cur = 0;
	if(obj.offsetParent) {		
		while(obj.offsetParent) {
			cur+=obj.offsetTop;
			obj = obj.offsetParent;
		}
	}
	return cur;
}

function getLeft(obj) {
	var cur = 0;
	if(obj.offsetParent) {		
		while(obj.offsetParent) {
			cur+=obj.offsetLeft;
			obj = obj.offsetParent;
		}
	}
	return cur;
}

/* Scroll */
function ULScroll(list_id, up_id, down_id)
{
	this.list = null;
	this.up = null;
	this.down = null;

	this.timeout = 0;
	this.movedOn = 0;
	this.toScroll = 0;
	this.lastItem = 0;
	this.currentItem = 0;
	this.currentNode = null;

	// Init
	this.list = document.getElementById(list_id)
	this.up = document.getElementById(up_id)
	this.down = document.getElementById(down_id)

	// Validation
	if ( !this.list )
	{
		//alert('A list that you are trying to scroll does not exist')
		return false;
	}
	
	if ( !this.up )
	{
		//alert('Can not find an up button')
		return false
	}
	
	if ( !this.down )
	{
		//alert('Can not find an down button')
	}
	
	if ( !parseInt(this.list.style.top) )
	{
		this.list.style.top = 0
	}
	
	// Assign actions
	var me = this
	if (this.up.attachEvent) 
	{ // IE
		this.up.attachEvent("onclick", function(){me.scrollList("down")});
		this.down.attachEvent("onclick", function(){me.scrollList("up")});
	} 
	else
	{ // Gecko / W3C
		this.up.addEventListener("click", function(){me.scrollList("down")}, false);
		this.down.addEventListener("click", function(){me.scrollList("up")}, false);
	}

	// Whitespace
	this.list = stripWhiteSpace(this.list)
	
	if ( this.list.childNodes.length > 1 )
	{
		for( i = 0; i < this.list.childNodes.length-1; i++ )
		{
			this.toScroll += this.list.childNodes.item(i).offsetHeight
			this.list.childNodes.item(i).scrolledBy = 0
		}
	}
}

ULScroll.prototype.scrollList = function ( direction )
{
	// Scrolling right now
	if ( this.timeout != 0 )
	{
		return true;
	}
	
	if ( direction == "down" && Math.abs(parseInt(this.list.style.top)) == 0 )
	{
		return false; // we are at the start of the list
	}

	if ( direction == "up" && Math.abs(parseInt(this.list.style.top)) == this.toScroll )
	{
		return false; // we are at the end of the list and leaving one item in a window
	}

	var nodeIndex = direction == "up" ? this.currentItem : this.lastItem;
	var firstNode = this.list.childNodes.item(nodeIndex)
	var moveMax = firstNode.offsetHeight;
	var moveBy = 90
	var step = direction == "up" ? -2 : 2;
	var me = this;
	var next = true
	
	this.currentNode = firstNode

	if ( parseInt(moveMax) >= parseInt(this.list.parentNode.offsetHeight) )
	{
		if ( direction == 'up' )
		{
			if 	( moveMax == this.currentNode.scrolledBy )
			{
				next = true	
			}
			else
			{
				if ( this.currentNode.scrolledBy + moveBy > this.currentNode.offsetHeight )
				{
					moveMax = this.currentNode.offsetHeight - this.currentNode.scrolledBy
					this.currentNode.scrolledBy += moveMax
					next = true
				}
				else
				{
					moveMax = moveBy
					this.currentNode.scrolledBy += moveMax
					next = false;
				}	
			}
		}
	}
	
	// Adjustments
	if ( direction == "down" && Math.abs(parseInt(this.list.style.top)) - moveMax < 0 )
	{
		moveMax = Math.abs( 0 - Math.abs(parseInt(this.list.style.top)) )
	}
	
	if ( direction == "up" &&  Math.abs(parseInt(this.list.style.top)) + moveMax > this.toScroll )
	{
		moveMax = this.toScroll - Math.abs(parseInt(this.list.style.top))
	}
	
	//this.timeout = setInterval("moveList("+(step)+", "+moveMax+")", 10)
	this.timeout = setInterval(function(){ me.moveList(step, moveMax) }, 10);
	
	if ( next )
	{
		this.currentNode.scrolledBy = 0
		this.lastItem = direction == "up" ? this.currentItem : this.lastItem == 0 ? 0 : this.lastItem - 1;
		this.currentItem += direction == "up" ? 1 : this.currentItem == 0 ? 0 : -1 ;	
	}
}

ULScroll.prototype.moveList = function (top, maxi)
{	
	if ( maxi <= Math.abs(this.movedOn) )
	{
		clearInterval(this.timeout)
		this.movedOn = 0
		this.timeout = 0

		return true
	}
		

	this.list.style.top = (parseInt(this.list.style.top) + top) + "px";
	this.movedOn += top
}
/* End Scroll */


function stripWhiteSpace(obj)
{
	for( i=0; i < obj.childNodes.length; i++ )
	{
		if ( obj.childNodes.item(i).nodeType != 1 )
		{
			obj.removeChild(obj.childNodes.item(i));
		}
	}

	return obj
}


function moveSlider()
{
	var lastNode = null;
	
	var lastMovedIndex = 0;
	var lastHiddenIndex = 0; 
	
	for ( i = 0; i < _slidingBox.childNodes.length; i++ )
	{
		var node = _slidingBox.childNodes.item(i)

		if ( (node.offsetWidth + parseInt(node.style.left)) == 0 )
		{			
			var end_node = _slidingBox.childNodes.item(_slidingBox.childNodes.length-1)
			var new_index = _slidingBox.childNodes.length;
			if ( new_index >= _slidingBoxElements.childNodes.length )
			{
				//alert('null')
				new_index=0	
			}
			var new_node = _slidingBoxElements.childNodes.item(new_index)
			
			sliderAssignEvents(new_node)
			
			_slidingBoxElements.appendChild(node)
			_slidingBox.appendChild(new_node)
			
			// Out of bouderies
			if ( _slidingBox.offsetWidth > _slidingBoxContentWidth )
			{
				new_node.style.left = _slidingBox.offsetWidth + "px";
			}
			else
			{
				new_node.style.left = end_node.offsetWidth+parseInt(end_node.style.left) + "px";
			}
		}
		
		node.style.left = (parseInt(node.style.left) - 1) + "px";
		
		end_node = null
		new_node = null
	}
}

var _slidingBox = null;
var _slidingBoxContentWidth = 0;
var _slidingBoxElements = null;
function slide(id)
{
	_slidingBox = document.getElementById(id)
	
	if ( !_slidingBox )
	{
		alert('Element '+id+' does not exist')
		return false;
	}
	
	_slidingBox = stripWhiteSpace(_slidingBox);
	_slidingBoxElements = document.createElement("div")
	var currentOffset = 0;
	var node = null;
	var el = _slidingBox.childNodes.length;
	
	// Randomizing content
	var _randSlidingBox = document.createElement("div")
	var _elementIndexes = new Array(el);
	var index = 0;
	var inx = 0;
	while( inx < el )
	{
		// Random index for next element
		index = unique_rand(el, _elementIndexes)
		_randSlidingBox.appendChild(_slidingBox.childNodes.item(index).cloneNode(true));
		
		inx++;
	}

	
	// New radomized content
	_slidingBox.innerHTML = _randSlidingBox.innerHTML
	
	// Counting the width of slider content
	for( i = 0; i < el; i++ )
	{
		node = _slidingBox.childNodes.item(i);
		_slidingBoxContentWidth += node.offsetWidth
		node.style.left = currentOffset + "px";
		currentOffset += node.offsetWidth
		node.style.position = 'absolute';
		node.style.overflow = 'hidden';
		_slidingBoxElements.appendChild(node.cloneNode(true))
		
		sliderAssignEvents(node)
		
		node = null
	}
	
	// Removing elements we don't see
	for( i = (el-1); i >= 0; i-- )
	{
		node = _slidingBox.childNodes.item(i);

		if ( parseInt(node.style.left) > _slidingBox.offsetWidth )
		{
			//_slidingBox.removeChild(node)
		}
		
		node = null
	}

	window.logoSliderInterval = setInterval(function(){ moveSlider() }, 20)
}

function sliderAssignEvents( obj )
{
	if (obj.tagName != 'A')
	{
		return false;	
	}
	
	if (obj.attachEvent) 
	{ // IE
		obj.attachEvent("onmouseover", function(){stopSlider()});
		obj.attachEvent("onmouseout", function(){startSlider()});
	} 
	else
	{ // Gecko / W3C
		obj.addEventListener("mouseover", function(){stopSlider()}, false);
		obj.addEventListener("mouseout", function(){startSlider()}, false);
	}
}

function stopSlider()
{
	clearInterval(window.logoSliderInterval)
}

function startSlider()
{
	window.logoSliderInterval = setInterval(function(){ moveSlider() }, 20)
}

function unique_rand( maxn, array )
{
	var i = 0;
	var num = 0;
	var found = false;
	
	while ( true )
	{
		num = Math.round(Math.random()*10*((maxn-1)/10))
		if ( array.indexOf(num) == -1 )
		{
			break;
		}
	}
	
	array.append(num)
	return num;
}

Array.prototype.append = function (obj)
{
	for( i=0; i<this.length; i++ )
	{
		if ( isUndefined(this[i]) )
		{
			this[i]=obj
			break;
		}	
	}
}

Array.prototype.indexOf = function (obj)
{
	for( i=0; i<this.length; i++ )
	{
		if ( this[i] == obj )
		{
			return i
		}	
	}
	
	return -1;
}

function isUndefined(a) 
{
    return typeof a == 'undefined';
} 