function replace_str(find_str,replace_str){
var temp_str = this
replace_location=temp_str.indexOf(find_str)
	while(replace_location!=-1){
			left_str=temp_str.substring(0,replace_location)
			right_str=temp_str.substring(replace_location+find_str.length)
			temp_str=left_str+replace_str+right_str
			start_location=replace_location+replace_str.length
			replace_location=temp_str.indexOf(find_str,start_location)
	}
	return temp_str
}
String.prototype.replace=replace_str


var new_window=Array();
function window_img(img_name,w,h){
w_left=(screen.availWidth-w)/2
w_top=(screen.availHeight-h)/2
	name=img_name.replace('.','')
	name=name.replace('/','')
window_size="height="+h+",width="+w+",left="+w_left+",top="+w_top
	if (!new_window[name]){
		new_window[name] = window.open("/photo/album.html?"+img_name,"i"+name,window_size)
	}
	if (new_window[name].closed){
		new_window[name] = window.open("/photo/album.html?"+img_name,"i"+name,window_size)
	}
new_window[name].focus()
}
