//social bookmarking BEGIN
function bookMarkOver(text) {
	if (text == '') {
		text = '...';
	} else {
		text='&nbsp;<strong>'+text+'</strong>';
	}
	document.getElementById('socialText').innerHTML=text;
}
function bookMarkPage(bookmarkhandle) {
	socialurl=encodeURIComponent(location.href);
	socialtitle=encodeURIComponent(document.title);
	switch(bookmarkhandle) {		
		case 'delicious':
			window.open('http://del.icio.us/post?url='+socialurl+'&title='+socialtitle);
			break;
		case 'wong':
			window.open('http://www.mister-wong.de/index.php?action=addurl&bm_url='+socialurl+'&bm_description='+socialtitle);
			break;
		case 'blinkList':
			window.open('http://www.blinklist.com/index.php?Action=Blink/addblink.php&Description=&Url='+socialurl+'&Title='+socialtitle);
			break;
		case 'yahoo':
			window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?u='+socialurl+'&t='+socialtitle);
			break;
		case 'yigg':
			window.open('http://yigg.de/neu?exturl='+socialurl+'&exttitle='+socialtitle);
			break;	
		case 'furl':
			window.open('http://www.furl.net/storeIt.jsp?u='+socialurl+'&t='+socialtitle);
			break;
		case 'oneview':
			window.open('http://beta.oneview.de:80/quickadd/neu/addBookmark.jsf?URL='+socialurl+'&title='+socialtitle);			
			break;
		case 'folkd':
			window.open('http://www.folkd.com/submit/page/'+socialurl);
			break;
		case 'linkarena':	
			window.open('http://linkarena.com/bookmarks/addlink/?url='+socialurl+'&title='+socialtitle+'&desc=&tags=');
			break;
		case 'google': 		
			window.open('http://www.google.com/bookmarks/mark?op=add&hl=de&bkmk='+socialurl+'&title='+socialtitle);
			break;
		case 'webnews': 		
			window.open('http://www.webnews.de/einstellen?url='+socialurl+'&title='+socialtitle);
			break;
	}
}
//social bookmarking END
//xajax for search suggest BEGIN
function processChange() { 
   // The page has loaded and the HTTP status code is 200 OK 
   if (req.readyState == 4 && req.status == 200) { 

      // Write the contents of this URL to the searchResult layer 
      getObject("quicksearch").innerHTML = req.responseText;
   } 
} 
function getObject(name) { 
   var ns4 = (document.layers) ? true : false; 
   var w3c = (document.getElementById) ? true : false; 
   var ie4 = (document.all) ? true : false; 

   if (ns4) return eval('document.' + name); 
   if (w3c) return document.getElementById(name); 
   if (ie4) return eval('document.all.' + name); 
   return false; 
}
function hide(HLayer,completeOff){
 if(navigator.appName=='Netscape' && !document.getElementById){
  document.layers[HLayer].visibility = 'hide';
 }else{
 document.all[HLayer].style.visibility = 'hidden';
 }
 if(completeOff==1) {
   document.ssuggestOff=1;
 }
}
function show(SLayer,left_x,top_y){
 if(!document.getElementById(SLayer) ) {
   document.layers[SLayer].visibility = 'show';
   if(left_x>0) {
	document.layers[SLayer].style.left=left_x+'px';
   } 
   if(top_y>0) {
	document.layers[SLayer].style.top=top_y+'px';
	}
 }else{
   document.getElementById(SLayer).style.visibility = 'visible';
   if(left_x>0) {
	document.getElementById(SLayer).style.left=left_x+'px';
   }
   if(top_y>0) {
	document.getElementById(SLayer).style.top=top_y+'px';
	}
 }
}
function f_clientWidth() {
	return f_filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
function f_clientHeight() {
	return f_filterResults (
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);
}
function f_scrollLeft() {
	return f_filterResults (
		window.pageXOffset ? window.pageXOffset : 0,
		document.documentElement ? document.documentElement.scrollLeft : 0,
		document.body ? document.body.scrollLeft : 0
	);
}
function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}
function checkSocialBLayer() {
	
	scrollbar_y=f_scrollTop();
	
	if(scrollbar_y>5) {
		show('socialbookmarking',(f_clientWidth-303),(scrollbar_y));
	} else {
		hide('socialbookmarking',0);
	}
}
function getPageOffsetLeft(el) {
  return el.offsetLeft + (el.offsetParent ? getPageOffsetLeft(el.offsetParent) : 0);
}

function getPageOffsetTop(el) {
  return el.offsetTop + (el.offsetParent ? getPageOffsetTop(el.offsetParent) : 0);
}




