

function open_window(str_id) {
		document.getElementById(str_id).target="image"
		window.open("","image",'toolbar=0,location=0,scrollbars=1,width=400,height=300,resizable=1,left=0,top=0');
}


function picture_show(href) {
		
		window.open('/img.php?img='+href,"image",'toolbar=0,location=0,scrollbars=1,status=1,width=400,height=400,resizable=1,left=0,top=0');

}


function tag_a(){
	tag_a =  document.getElementsByTagName("a");
	str_web_name = location.hostname.substring(4,location.hostname.length);
	for (x=0; x<tag_a.length; x++){
		current_tag_a = tag_a[x].toString()
		if (current_tag_a.indexOf('http://')>-1){
			if (current_tag_a.indexOf(str_web_name)==-1){
				tag_a[x].target  = '_blank';
			}
		}
	}
}


function change_img(str_id,int_val){
	var tmp_img = document.getElementById(str_id);
	if (int_val == 0){
		tmp_img.src='images/'+str_id+'.gif';
	} else {
		tmp_img.src='images/'+str_id+'_a.gif';
	}
}

function set_href(str){
	location.href = str;
}