// INIT
var win_width = 900;
var win_height = 900;

window.onload = popImages;

function popImages() {
		var a, i, o;
	if ( o = document.getElementById("pic_col") ) {
		a = o.getElementsByTagName("a");
		for ( i=0; i<a.length; i++ ) {
			a[i].onclick = openPicture;
		} // for
	} // if 
} // function

function openPicture() {
	this.blur();
	var a, t_titel = '', t_quelle = '', f, get_vars = '';
	a = this.getElementsByTagName("span");
	for ( i=0; i<a.length; i++ ) {
		if ( a[i].className == "bildtitle" ) t_titel = a[i].innerHTML;
		if ( a[i].className == "quelle" ) t_quelle = a[i].innerHTML;
	}
	get_vars = 'bild='+this.href+'&titel='+t_titel+'&quelle='+t_quelle;
	f = window.open('/js/bildopen.php?'+get_vars,'','width='+win_width+',height='+win_height+'');
	f.focus();
	return false;
}

/*
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("img");
 window.resizeTo(950,750);
 
 var info_img = new Array();
 var info_txt = new Array();
 
 for (var i=0; i<anchors.length; i++) {
   var anchores = anchors[i];
   if (anchores.getAttribute("src") &&
       anchores.getAttribute("rel") ){

		
	 	info = anchores.getAttribute("rel");
		arr_info = info.split("||");
		var arr_index_setz = 'c'+i;
		
		info_img[arr_index_setz] = arr_info[0];
		info_txt[arr_index_setz] = arr_info[1];
		document.getElementById( 'l' + i ).setAttribute( "href", '#' );
		
		anchores.onclick = function(){
			document.getElementById("img_innen").setAttribute( "src", '/bild/' + info_img[this.getAttribute("id")] );
			document.getElementById("txt_innen").innerHTML = info_txt[this.getAttribute("id")];
		}
   }
 }
}
*/
