function swapDivs(item1_name,item2_name) {
	// We need a clone of the node we want to swap

	var item1 = document.getElementById(item1_name);
	var item2 = document.getElementById(item2_name);

	var itemtmp = item1.cloneNode(1);

	// We also need the parentNode of the items we are going to swap.
	var parent = item1.parentNode;

	// First replace the second node with the copy of the first node
	// which returns a the new node
	item2 = parent.replaceChild(itemtmp,item2);

	//Then we need to replace the first node with the new second node
	parent.replaceChild(item2,item1);

	// And finally replace the first item with it's copy so that we
	// still use the old nodes but in the new order. This is the reason
	// we don't need to update our Behaviours since we still have
	// the same nodes.
	parent.replaceChild(item1,itemtmp);

	// Free up some memory, we don't want unused nodes in our document.
	itemtmp = null;
}



function m_over(n) {
	document.getElementById("item"+n+"_layer").style.background="#b2b2b2";
	MM_showHideLayers('subnavi' + n,'','show');
}

function m_out(n) {
	document.getElementById("item"+n+"_layer").style.background="#ffffff";
	MM_showHideLayers('subnavi' + n,'','hide');
}

function over(n,color) {
	document.getElementById("item"+n+"_text").style.color = color;
}

function out(n,color) {
	document.getElementById("item"+n+"_text").style.color = color;
}

function set_cookie ( name, value) {
  	var cookie_string = name + "=" + escape ( value );
  	document.cookie = cookie_string;
}


function get_cookie ( cookie_name ) {
  	var results = document.cookie.match ( cookie_name + '=(.*?)(;|$)' );

  	if ( results )
  	  return ( unescape ( results[1] ) );
  	else
  	  return null;
}

function delete_cookie ( cookie_name ) {
  	var cookie_date = new Date ( );  // current date & time
  	cookie_date.setTime ( cookie_date.getTime() - 1 );
  	document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();
}

function popup(url) {
 	var window2 = window.open(url,'window2','height=420,width=768,scrollbars=no,locationbar=no,menubar=no,resizable=no,statusbar=no');
}

