
function Go(url){	
	href=url;
	document.frm_go.action=href;
	document.frm_go.target='';
	document.frm_go.submit();
}

function popup(url,w,h){
	var popup=window.open(url,"popup","status=no,toolbar=no,location=no,menue=no,scrollbars=no,width=" + w + ",height=" + h);
}


function GoParameter(url, parameter)
{	href=url;
 	document.frm_go.action=href;
	document.frm_go.target='';
	document.frm_go.pageparameter.value=parameter;
	document.frm_go.submit();		
}

function set(o){
	document.search.offset.value=o;
	document.search.submit();
}

function news_index(){
	document.search.q.value="";
	document.search.submit();
}

function warn(msg){
	window.alert(msg);
}
function over(n,p,q){
	document.getElementById('d' + n).className = p;
	document.getElementById('l' + n).className = q;
}
function click(p){
	    n = 'sub_' + p;
	    x = 'pic_' + p;
	    if(document.getElementById(n).style.display == 'none'){
	    	document.getElementById(n).style.display = 'inline';
	    	document.getElementById(x).src = 'http://www.sites-cms.de/images/icon_end_13.gif';
	    }else{
		document.getElementById(n).style.display = 'none';
		document.getElementById(x).src = 'http://www.sites-cms.de/images/icon_plus_13.gif';
	    }
	    var q = '';
}
function offset(n){
    document.frm_se.offset.value = n;
    document.frm_se.submit();
}

/* Externe Links im neuen Fenster öffnen */
this.blankwin = function(){
	var hostname = window.location.hostname;
	hostname = hostname.replace("www.","").toLowerCase();
	var a = document.getElementsByTagName("a");	
	this.check = function(obj){
		var href = obj.href.toLowerCase();
		return (href.indexOf("http://")!=-1 && href.indexOf(hostname)==-1 && href.indexOf("bohnenkamp")==-1) ? true : false;				
	};
	this.set = function(obj){
		obj.target = "_blank";
	};	
	for (var i=0;i<a.length;i++){
		if(check(a[i])){
			set(a[i]);
		}
	};
};

this.addEvent = function(obj,type,fn){
	if(obj.attachEvent){
		obj['e'+type+fn] = fn;
		obj[type+fn] = function(){obj['e'+type+fn](window.event );}
		obj.attachEvent('on'+type, obj[type+fn]);
	} else {
		obj.addEventListener(type,fn,false);
	};
};
addEvent(window,"load",blankwin);

