function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
function MM_displayStatusMsg(msgStr) { //v1.0
status=msgStr;
document.MM_returnValue = true;
}

function CheckInput() {

if( document.mailinput.email.value == "" ) {
alert("Keine Mail-Adresse angegeben?");
document.mailinput.email.focus();
return false;
}

var suche = /[_\.\&\-\w]+@([\w\-]+\.)+[\w]{2,4}/;
if( ! suche.test(document.mailinput.email.value) ) {
alert("Die Mailadresse hat ein ungültiges Format!");
document.mailinput.email.focus();
return false;
}

return true;
}

function MM_jumpMenu(targ,selObj,restore){
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


			function changenewsflash(id)
			{
				arr = document.getElementsByName('newsflash');

				for (i=0; i < arr.length; ++i)
				{
					if (i == id)
					{
						arr[i].className = 'active';
					}
					else
					{
						arr[i].className = '';
					}
				}
			}

			function changerubrikencheck(id)
			{
				arr = document.getElementsByName('rubrikencheckblock');

				for (i=0; i < arr.length; ++i)
				{
					if (i == id)
					{
						arr[i].className = 'active';
					}
					else
					{
						arr[i].className = '';
					}
				}
			}

			function changebrandaktuell(id)
			{
				arr = document.getElementsByName('brandaktuellblock');

				for (i=0; i < arr.length; ++i)
				{
					if (i == id)
					{
						arr[i].className = 'active';
					}
					else
					{
						arr[i].className = '';
					}
				}
			}

			function changebrandvoraus(id)
			{
				arr = document.getElementsByName('vorausgeschautblock');

				for (i=0; i < arr.length; ++i)
				{
					if (i == id)
					{
						arr[i].className = 'active';
					}
					else
					{
						arr[i].className = '';
					}
				}
			}			
function sendRequest(art) {
        try {
                req = window.XMLHttpRequest?new XMLHttpRequest(): 
                new ActiveXObject("Microsoft.XMLHTTP"); 
        } catch (e) {
                //Kein AJAX Support
        } 

        req.onreadystatechange = handleResponse;
        id = art;
        req.open('get', 'ax_news.php?q='+ id);
	//req.open('get', 'ax_news.php');
        req.send(null); 
}
 
function handleResponse() {
        if ((req.readyState == 4) && (req.status == 200)) { 
                document.getElementById('dvdnews').innerHTML = req.responseText;
        }
}

function sendRequest_brandaktuell(art) {
        try {
                req = window.XMLHttpRequest?new XMLHttpRequest(): 
                new ActiveXObject("Microsoft.XMLHTTP"); 
        } catch (e) {
                //Kein AJAX Support
        } 

        req.onreadystatechange = handleResponse_brandaktuell;
        id = art;
        req.open('get', 'ax_cover.php?q='+ id);
	//req.open('get', 'ax_news.php');
        req.send(null); 
}
 
function handleResponse_brandaktuell() {
        if ((req.readyState == 4) && (req.status == 200)) { 
                document.getElementById('brandaktuell').innerHTML = req.responseText;
        }
}


function sendRequest_changerubrikencheck(art) {
        try {
                req = window.XMLHttpRequest?new XMLHttpRequest(): 
                new ActiveXObject("Microsoft.XMLHTTP"); 
        } catch (e) {
                //Kein AJAX Support
        } 

        req.onreadystatechange = handleResponse_changerubrikencheck;
        id = art;
        req.open('get', 'ax_cover3.php?q='+ id);
	//req.open('get', 'ax_news.php');
        req.send(null); 
}
 
function handleResponse_changerubrikencheck() {
        if ((req.readyState == 4) && (req.status == 200)) { 
                document.getElementById('rubrikencheck').innerHTML = req.responseText;
        }
}

function sendRequest_vorausgeschaut(art) {
        try {
                req = window.XMLHttpRequest?new XMLHttpRequest(): 
                new ActiveXObject("Microsoft.XMLHTTP"); 
        } catch (e) {
                //Kein AJAX Support
        } 

        req.onreadystatechange = handleResponse_vorausgeschaut;
        id = art;
        req.open('get', 'ax_cover2.php?q='+ id);
	//req.open('get', 'ax_news.php');
        req.send(null); 
}
 
function handleResponse_vorausgeschaut() {
        if ((req.readyState == 4) && (req.status == 200)) { 
                document.getElementById('vorausgeschaut').innerHTML = req.responseText;
        }
}

function opener(url)
{
url2 = escape(url);

if (url2.substring(0,24) == "http%3A//www.etracker.de") {
	url2 = url2.replace("http%3A//www.etracker.de/lnkcnt.php%3Fet%3DjYVT3b%26url%3D", "http://www.etracker.de/lnkcnt.php?et=jYVT3b&url=");
	url = url2.replace("%26lnkname%3D", "&lnkname=");
}
win = window.open(url);
}

function bookit(bookmark, bTITLE) {
	var bookmarkURL = encodeURIComponent('http://www.digitalvd.de');
	var bookmarkTitle = encodeURIComponent('digitalvd.de'+bTITLE);
	switch(bookmark) {		
		case 'b_del-icio-us':
			window.open('http://del.icio.us/post?v=2&url='+bookmarkURL+'&notes=&tags=&title='+bookmarkTitle);
			break;
		case 'b_mister-wong':
			window.open('http://www.mister-wong.de/index.php?action=addurl&bm_url='+bookmarkURL+'&bm_notice=&bm_description='+bookmarkTitle+'&bm_tags=');
			break;
		case 'b_linkarena':
			window.open('http://linkarena.com/bookmarks/addlink/?url='+bookmarkURL+'&title='+bookmarkTitle+'&desc=&tags=');
			break;
		case 'b_yigg':
			window.open('http://yigg.de/neu?exturl='+bookmarkURL+'&exttitle='+bookmarkTitle);
			break;		
		case 'b_google':
			window.open('http://www.google.com/bookmarks/mark?op=add&hl=de&bkmk='+bookmarkURL+'&annotation=&labels=&title='+bookmarkTitle);
			break;
		case 'b_webnews':
			window.open('http://www.webnews.de/einstellen?url='+bookmarkURL+'&title='+bookmarkTitle);
			break;
		case 'b_digg':
			window.open('http://digg.com/submit?phase=2&url='+bookmarkURL+'&bodytext=&tags=&title='+bookmarkTitle);
			break;
		case 'b_spurl':
			window.open('http://www.spurl.net/spurl.php?v=3&tags=&title='+bookmarkTitle+'&url='+bookmarkURL);
			break;
		case 'b_furl':
			window.open('http://www.furl.net/storeIt.jsp?u='+bookmarkURL+'&keywords=&t='+bookmarkTitle);
			break;
		case 'b_yahoo':
			window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?t='+bookmarkTitle+'&d=&tag=&u='+bookmarkURL);
			break;
		case 'b_blinklist':
			window.open('http://www.blinklist.com/index.php?Action=Blink/addblink.php&Description=&Tag=&Url='+bookmarkURL+'&Title='+bookmarkTitle);
			break;
		case 'b_folkd':
			window.open('http://www.folkd.com/page/submit.html?step2_sent=1&url='+bookmarkURL+'&check=page&add_title='+bookmarkTitle+'&add_description=&add_tags_show=&add_tags=&add_state=public');
			break;
		case 'b_netvouz':
			window.open('http://www.netvouz.com/action/submitBookmark?url='+bookmarkURL+'&description=&tags=&title='+bookmarkTitle+'&popup=yes');
			break;
		case 'b_smarking':
			window.open('http://smarking.com/editbookmark/?url='+bookmarkURL+'&description=&tags=');
			break;
		case 'b_ma-gnolia':
			window.open('http://ma.gnolia.com/bookmarklet/add?url='+bookmarkURL+'&title='+bookmarkTitle+'&description=&tags=');
			break;
		case 'b_blinkbits':
			window.open('http://www.blinkbits.com/bookmarklets/save.php?v=1&title='+bookmarkTitle+'&source_url='+bookmarkURL+'&source_image_url=&rss_feed_url=&rss_feed_url=&rss2member=&body=');
			break;
		case 'b_newsvine':
			window.open('http://www.newsvine.com/_wine/save?popoff=1&u='+bookmarkURL+'&tags=&blurb='+bookmarkTitle);
			break;
		case 'b_technorati':
			window.open('http://technorati.com/faves/seoportal?add='+bookmarkURL+'&tag=');
			break;
		case 'b_diigo':
			window.open('http://www.diigo.com/post?url='+bookmarkURL+'&title='+bookmarkTitle+'&tag=&comments=');
			break;
		case 'b_blogmarks':
			window.open('http://blogmarks.net/my/new.php?mini=1&simple=1&url='+bookmarkURL+'&content=&public-tags=&title='+bookmarkTitle);
			break;
		case 'b_reddit':
			window.open('http://reddit.com/submit?url='+bookmarkURL+'&title='+bookmarkTitle);
			break;
		case 'b_icio':
			window.open('http://www.icio.de/add.php?url='+bookmarkURL);
			break;
		case 'b_simpy':
			window.open('http://www.simpy.com/simpy/LinkAdd.do?title='+bookmarkTitle+'&tags=&note=&href='+bookmarkURL);
			break;
		case 'b_oneview':
			window.open('http://www.oneview.de/login/loginBookmarklet.jsf?URL='+bookmarkURL+'&title='+bookmarkTitle);	
			break;
		case 'b_alltagz':
			window.open('http://www.alltagz.de/login/?action=add&popup=1&address='+bookmarkURL+'&title='+bookmarkTitle);	
			break;
		case 'b_citeulike':
			window.open('http://www.citeulike.org/posturl?url='+bookmarkURL+'&title='+bookmarkTitle);	
			break;
		case 'b_complore':
			window.open('http://complore.com/?q=node/add/flexinode-5&url='+bookmarkURL+'&title='+bookmarkTitle);	
			break;
		case 'b_dzone':
			window.open('http://www.dzone.com/links/add.html?url='+bookmarkURL+'&title='+bookmarkTitle);	
			break;
		case 'b_feedmarker':
			window.open('http://www.feedmarker.com/admin.php?do=bookmarklet_mark&url='+bookmarkURL+'&title='+bookmarkTitle);	
			break;
		case 'b_givealink':
			window.open('http://www.givealink.org/cgi-pub/bookmarklet/bookmarkletLogin.cgi?&uri='+bookmarkURL+'&title='+bookmarkTitle);	
			break;
		case 'b_linkagogo':
			window.open('http://www.linkagogo.com/go/AddNoPopup?title='+bookmarkTitle+'&url='+bookmarkURL);	
			break;
		case 'b_linkroll':
			window.open('http://www.linkroll.com/index.php?action=insertLink&url='+bookmarkURL+'&title='+bookmarkTitle);	
			break;
		case 'b_unalog':
			window.open('http://unalog.com/my/stack/link?url='+bookmarkURL+'&title='+bookmarkTitle);	
			break;
	}	
}

<!-- CLICK-TRACKER DELAY CODE -->
var toSleep = true; function stopTimer(){toSleep=false;}
function clickTracker(LinkName){var secureID="jYVT3b";
var redirectUrl="http://www.etracker.de/skin/de.def/img/1px.gif";
etrackerSink=new Image(1,1);toSleep=true;
etrackerSink.src="http://www.etracker.de/lnkcnt.php?et="+secureID+"&url="+
redirectUrl+"&lnkname="+LinkName;etrackerSink.onload=stopTimer;if(toSleep==true)
{maxDelay(500);}return true;}function maxDelay(gap){var then,now;then=new
Date().getTime();now=then; while( toSleep==true&&(now-then)<gap){now=new Date().
getTime();}}
<!-- CLICK-TRACKER DELAY CODE -->



// Link Building Pro ver 1.0
// Copyright Latent Motion, at seox.org

function initLINK(){

// Options:
var useMetaKeyword = false; // Otherwise, page title
var minLength = 40; // Min selection chars
var useMetaAuthor = false; // Otherwise use domain
var addLinks = true; // Otherwise, just cite at end
var skip = new Array("home","link","click here"); // Don't link these (lowercase!)
	
function D(b,a,c){if(b.addEventListener)b.addEventListener(a,c,false);else b.attachEvent&&b.attachEvent("on"+a,c)}function o(b,a){if(typeof b=="undefined"||b==null||!RegExp)return false;a=new RegExp("(^|\\s)"+a+"(\\s|$)");if(typeof b=="string")return a.test(b);else if(typeof b=="object"&&b.className)return a.test(b.className);return false}function E(b,a){var c=false,j;for(j=b.parentNode;j!=undefined;){if(b.parentNode==e.body)break;else if(b.parentNode==a){c=true;break}j=j.parentNode}return c}
function F(b){return b.replace(/^\s*/,"")}function G(b){return b.replace(/\s*$/,"")}function H(b){return G(F(b))}var I=new Array("home","link","click here"),e=document,x=window,t=e.getElementsByTagName("body")[0],p=e.getElementsByName("author"),i=e.getElementsByName("keywords"),q=x.location.toString(),u=e.title.toString(),d;if(!Array.indexOf)Array.prototype.indexOf=function(b,a){var c=-1;for(a=a|0;a<this.length||a==-1;a++)if(this[a]==b)c=a;return c};if(i.length>0&&useMetaKeyword){i=e.getElementsByName("keywords")[0].getAttribute("content").split(",");
u=Math.floor(Math.random()*i.length);i=i[u].replace(/^\s*|\s*$/,"")}else i=u;p=(p.length>0&&useMetaAuthor)?p[0].getAttribute("content"):e.domain;var y="<p id='credit'><br/>Quelle: <a href='"+q+"'>"+i+"</a> von <a href='http://"+e.domain+"' />"+p+"</a></p>";if(/MSIE/g.test(navigator.userAgent))var v="msie";else if(/Safari/g.test(navigator.userAgent))v="safChrome";q=e.createElement("span");q.setAttribute("id","sasText");t.appendChild(q);d=e.getElementById("sasText");posType=document.all&&!window.opera&&!window.XMLHttpRequest?
"absolute":"fixed";d.style.position=posType;d.style.top="0px";d.style.left="-9999px";D(t,"copy",function(){d.innerHTML=y;if(v=="msie"){for(var b=e.selection.createRange(),a=b.parentElement();a.nodeName!="BODY"&&!o(a,"lbExclude");)a=a.parentNode;if(o(a,"lbExclude"))return true;a=e.body.createTextRange();a.moveToElementText(d);var c=b.duplicate();c=c.htmlText;if(c.length>minLength){d.id="tempSasText";d.innerHTML=c+y;(c=e.getElementById("sasText"))&&c.parentNode.removeChild(c);d.id="sasText";a.select()}}else{b=
x.getSelection();for(a=b.anchorNode;a.nodeName!="BODY"&&!o(a,"lbExclude");)a=a.parentNode;if(o(a,"lbExclude"))return false;if(b==""&&v=="safChrome"){d.innerHTML=t.innerHTML;a=document.createRange();b.removeAllRanges();a.selectNodeContents(d);b.addRange(a)}else if(b.toString().length>minLength){var j=e.getElementById("credit");a=b.getRangeAt(0);c=a.cloneContents();d.id="tempSasText";d.insertBefore(c,j);(c=e.getElementById("sasText"))&&c.parentNode.removeChild(c);d.id="sasText";b.removeAllRanges();a.selectNode(d);
b.addRange(a)}}var w=[];a=d.getElementsByTagName("a");for(b=0;b<a.length;b++)w.push(a[b].href);if(addLinks){a=e.getElementsByTagName("a");for(b=0;b<a.length;b++){var r=a[b].href;if(w.indexOf(r)==-1)if(E(a[b],d)==false){var f=H(a[b].innerHTML).toLowerCase();if(skip.indexOf(f)==-1)if((new RegExp(e.domain,"g")).test(r)){var z=[];function n(g,k,l){for(var A=g.childNodes.length;A-- >0;){var h=g.childNodes[A];if(h.nodeType===1)h.tagName.toLowerCase()!=="a"&&n(h,k,l);else if(h.nodeType===3)for(var m=h.data.length;1;){m=
h.data.lastIndexOf(k,m);if(m===-1||z.indexOf(k.toLowerCase())!==-1)break;var B=/\w/;if(h.nodeValue.charAt(m-1).match(B)||h.nodeValue.charAt(m+f.length).match(B))break;l.call(window,h,m)}}}function s(g,k){g.splitText(k+f.length);var l=e.createElement("a");l.href=r;l.appendChild(g.splitText(k));g.parentNode.insertBefore(l,g.nextSibling);z.push(f.toLowerCase());w.push(r)}n(d,f,s);f=f.charAt(0).toUpperCase()+f.slice(1);n(d,f,s);f=f.toUpperCase();n(d,f,s);f=f.replace(/\w\S*/g,function(g){return g.charAt(0).toUpperCase()+
g.substr(1).toLowerCase()});n(d,f,s)}}}}})}window.onload=initLINK;

function setup() {
 initLINK();
}


function google_ad_request_done(ads) {
}

function google_radlink_request_done(radlinks) {
        if (radlinks.length < 1)
          return;
        document.write("<span style=\"color: #fff; font-weight:bold; text-decoration: underline; background-color: #cc0000;\">&nbsp;Google Anzeigen&nbsp;</span>\n");
        for(i=0; i < radlinks.length; ++i) {
          if (i == 3) {
		document.write("<a target=\"_top\" rel=\"nofollow\" href=\"http://www.digitalvd.de/results.php?google_kw=" + radlinks[i].url_escaped_term + "&google_page_url=" + window.location + "\">" + radlinks[i].term + "</a>\n");
	  } else {
		document.write("<a target=\"_top\" rel=\"nofollow\" href=\"http://www.digitalvd.de/results.php?google_kw=" + radlinks[i].url_escaped_term + "&google_page_url=" + window.location + "\">" + radlinks[i].term + "</a> - \n");		
	  }
        }
      }

		 google_ad_client = 'pub-0918361315947683'; // substitute your client_id
         google_ad_channel = '7589895515';
         google_ad_output = 'js';
         google_max_num_ads = '10';
		 google_encoding="latin1";
         google_num_radlinks = '2';
         google_max_radlink_len = '30';
         google_rl_filtering = 'medium';
         google_rl_mode = 'default';
		 
function FFSuggest() {
	
	var pRequest;
	var pLayer;
	var pDebug					= false;
	var pInstanceName			= '';
	var pSearchURL				= '';
	var pQueryParamName			= '';
	var pFormname 				= '';
	var pLayerName				= '';
	var pQueryInput;
	var pSuggest				= new Array();
	var pLastQuery;
	var pCurrentSelection		= 0;
	var submitted				= false;

	var pSuggestQueryClass 		= 'suggestTextQuery';
	var pSuggestTypeClass 		= 'suggestTextType';
	var pSuggestAmountClass     = 'suggestTextAmount';
	var pSuggestQueryTypedClass = 'suggestTextQueryTyped';
	var pSuggestFooterClass     = 'suggestFooter';
	var pSuggestHeaderClass     = 'suggestHeader';
	var pSuggestRowClass	    = 'suggestRow';
	var pSuggestHighlightClass  = 'suggestHighlight';

	this.init = function(searchURL, formname, queryParamName, divLayername, instanceName, debugMode, channelParamName, channel) {
		pSearchURL			= searchURL;
		pFormname			= formname;
		pQueryParamName		= queryParamName;
		pChannelParamName	= channelParamName;
		pChannel			= channel;
		pLayerName			= divLayername;
		pInstanceName		= instanceName;
 		pDebug				= debugMode;
		if (pSearchURL == '') {		
			if (pDebug) alert('no searchurl defined');
			return null;
		} else if (pInstanceName == '') {
			if (pDebug) alert('no instancename defined');
			return null;
		} else if (pFormname == '') {
			if (pDebug) alert('no formname defined');
			return null;
		} else if (pQueryParamName == '') {
			if (pDebug) alert('no queryparamname defined');
			return null;
		} else if (pLayerName == '') {
			if (pDebug) alert('need a layer for output');
		}
		pQueryInput = document[pFormname][pQueryParamName];
		pQueryInput.onkeyup	= handleKeyPress;
		pQueryInput.onfocus	= showLayer;
		pQueryInput.onblur	= hideLayer;
		document[pFormname].onsubmit = handleSubmit;
	}
	
	function handleSubmit() {
		submitted = true;
		if (pSuggest[pCurrentSelection] != undefined) {
			document[pFormname][pQueryParamName].value = pSuggest[pCurrentSelection].split('###')[0];
			if(document[pFormname]['queryFromSuggest'] != null){
				document[pFormname]['queryFromSuggest'].value = true;
			}
		}
	}
	
	this.handleClick = function() {
		if (pSuggest[pCurrentSelection] != undefined) {
			document[pFormname][pQueryParamName].value = pSuggest[pCurrentSelection].split('###')[0];
			if(document[pFormname]['queryFromSuggest'] != null){
				document[pFormname]['queryFromSuggest'].value = true;
			}
			document[pFormname].submit();
		}
	}
	
	this.handleMouseOver = function(pos) {
		var tblCell = getTableCell(pos);
		unmarkAll();
		if (tblCell != null) {
			highlightSuggest(tblCell);
			pCurrentSelection = pos;
		}
	}
	
	this.handleMouseOut = function(pos) {
		var tblCell = getTableCell(pos);
		if (tblCell != null) {
			unmarkSuggest(tblCell);
			pCurrentSelection = -1
		}
	}
	
	function handleKeyPress(evt) {
		evt = (evt) ? evt : ((event) ? event : null);
		var keyCode = evt.keyCode;
		if (keyCode == 38) {
			moveSelection('up')
		} else if (keyCode == 27) {	
			hideLayer();
		} else if (keyCode == 40) {
			moveSelection('down');
		} else {
			if (pQueryInput.value == '') {
				hideLayer();
				if (pLayer != null){ pLayer.innerHTML = ''; }
				return null;
			}
			if (pLastQuery != pQueryInput.value){ startAjax(); }
			pLastQuery = pQueryInput.value;
		}
	}
	
	function moveSelection(direction) {
		var pos = pCurrentSelection;
		if (direction == 'up'){	pos--; }
		else{ 					pos += 1; }
		
		if (pos < 0) {
			unmarkAll();
			pQueryInput.focus();
			pCurrentSelection	= -1;
		} else {
			var tblCell = getTableCell(pos);
			if (tblCell != null) {
				unmarkAll();
				highlightSuggest(tblCell);
				pCurrentSelection = pos;
			}
		}
		
		var query = pQueryInput.value;
		pQueryInput.value = '';
		pQueryInput.focus();
		pQueryInput.value = query; 
	}
	
	function startAjax() {
		var query = pQueryInput.value;
		var requestURL = pSearchURL +'?'+ pQueryParamName +'='+ escape(query) +'&'+ pChannelParamName +'='+ pChannel;
		
		try {
			if( window.XMLHttpRequest ) {
				pRequest = new XMLHttpRequest();
			} else if( window.ActiveXObject ) {
				pRequest = new ActiveXObject( "Microsoft.XMLHTTP" );
			} else {
				if (pDebug) alert( 'no ajax connection' );
			}
			
			pLayer = document.getElementById(pLayerName);
			if (pLayer != null) {
				if (query != '') {

					pRequest.open( "GET", requestURL, true );
					pRequest.onreadystatechange = callbackAjax;
					pRequest.send( null );
				} else {
					hideLayer();
				}
			} else {
				if (pDebug) alert( 'no layer for output found' );
			}
		} catch( ex ) {
			hideLayer();
			if (ex == undefined) {
				if (pDebug) alert( 'Error: ' + ex.getmessage );
			} else {
				if (pDebug) alert( 'Error: ' + ex );
			}
		}
	}
	
	function hideLayer() {
		if (pLayer != null) {
			pLayer.style.display = 'none';
			fireSuggestLayerHidden();
		}
	}
	
	this.hideLayerOutsideCall = function() {
		if (pLayer != null) {
			pLayer.style.display = 'none';
			fireSuggestLayerHidden();
		}
	}
	
	function showLayer() {
		if (pLayer != null && pSuggest != null && pSuggest.length >= 1) {
			pLayer.style.display = 'block';
		}
	}
	
	function callbackAjax() {
		if (submitted == false) {
			if (pRequest.readyState == 4) {
				if (pRequest.status != 200) {
					hideLayer();
					if (pDebug) alert( 'Error (' + pRequest.status + '): ' + pRequest.statusText );
				} else {
					handleResponse(pRequest.responseText);
				}
			}
		}
  }

	// calls the callback for "outside" listeners if the callback is implemented
	function fireSuggestCompleted(suggestLayerIsVisible) {
		if (typeof(onSuggestCompleted) == 'function') {
			onSuggestCompleted(suggestLayerIsVisible);
		}
	}
	
	// calls the callback for "outside" listeners if the callback is implemented
	function fireSuggestLayerHidden() {
		if (typeof(onSuggestLayerHidden) == 'function') {
			onSuggestLayerHidden();
		}
	}

	function handleResponse(text) {
		pCurrentSelection = -1;
		pSuggest = new Array();
		pSuggest = text.split('\n');
		var outputText = '<table cellpadding="0" cellspacing="0" class="' + pLayerName + '" width="100%" border="0" onMouseDown="' + pInstanceName + '.handleClick();">';
		outputText += '<tr class="'+pSuggestHeaderClass+'" ><td nowrap="nowrap" colspan="3"><ff:jsescape><bean:message bundle="Suggest" key="header" /></ff:jsescape></td></tr>';
		
		var pNewSuggest = new Array();
		//for (var i in pSuggest) {
		for (var i = 0; i < pSuggest.length; i++) {
			var firstChar = pSuggest[i].charCodeAt(0);
			
			if (firstChar != 13 && firstChar != 10 && pSuggest[i].length >= 1) {
				pNewSuggest.push(pSuggest[i]);
			}
		}
		pSuggest = pNewSuggest;
		var query = pQueryInput.value;
		
		for (var i = 0; i < pSuggest.length; i++) {
			pSuggestParts = new Array();
			pSuggestParts = pSuggest[i].split("###");
			
			outputText += '<tr id="' + pLayerName + '_' + i + '" class="'+pSuggestRowClass+'" onMouseOver="' + pInstanceName + '.handleMouseOver(' + i + ');" onMouseOut="' + pInstanceName + '.handleMouseOut(' + i + ');">'
								+'<td nowrap="nowrap" class="'+ pSuggestQueryClass +'">' + pSuggestParts[0].replace(new RegExp("("+query+")","ig"),'<span class="'+pSuggestQueryTypedClass+'">$1</span>') + '</td>'
								+'<td nowrap="nowrap" class="'+ pSuggestAmountClass +'">' + pSuggestParts[1] + '</td>'
						+'</tr>';
		}
		outputText += '<tr><td class="'+pSuggestFooterClass+'" colspan="3">&nbsp;</td></tr></table>';
		if (pSuggest.length >= 1) {
			showLayer();
			pLayer.innerHTML = outputText;

			// calback for "outside" listeners
			fireSuggestCompleted(true);
		} else {
			hideLayer();
			pLayer.innerHTML = '';
			
			// calback for "outside" listeners
			fireSuggestCompleted(false);
		}
		
	}
	
	function highlightSuggest(tblCell) {
		tblCell.className = pSuggestHighlightClass; 
	}
	
	function unmarkSuggest(tblCell) {
		tblCell.className = pSuggestRowClass; 
	}
	
	function unmarkAll() {
		var tblCell;
		//for (var i in pSuggest) {
		for (var i = 0; i < pSuggest.length; i++) {
			tblCell = getTableCell(i);
			if (tblCell != null) {
				unmarkSuggest(tblCell);
			}
		}
	}
	
	function getTableCell(pos) {
		var tblCell;
		tblCell = document.getElementById(pLayerName + '_' + pos);
		return tblCell;
	}
}


		 
