function open_img_big1(img, pic_width, pic_height, pic_path){ // just sqBox
	//var pic_id = $(img).getProperty('id');	
	//var pic_height = parseInt($(pic_id+'_height').getProperty('value')) + 0;
	//var pic_width = parseInt($(pic_id+'_width').getProperty('value')) + 0;
//	var pic_path = $(pic_id+'_path').getProperty('value'); 
	//alert(pic_path);
	var wraper = new Element('div', {id:'img_wraper', styles:{width:pic_width+'px', 'overflow':'hidden'}});
	var bilde = new Element('img', {src: pic_path, styles: { width:pic_width+"px"}});	
	//var text_dic = new Element('div', {html:$(img).get('bilde_text'), styles:{height:'20px', 'overflow':'hidden'}});
	bilde.inject(wraper);	
	//text_dic.inject(wraper);	
	SqueezeBox.fromParams({handler:'div', size:{x:pic_width+0,y:pic_height}, div_cont:wraper, divOptions:{styles:{overflow:'hidden'}}, onClose:function(){
		var bilde_f = bilde;
		var wraper_f = wraper;
		delete bilde_f;
		delete wraper_f;		
	}});	
}
function open_img_big(img, pic_width, pic_height, pic_path, org_path, title, filename){ // sqBox with download button	
	var wraper = new Element('div', {id:'img_wraper', styles:{width:pic_width+'px', 'overflow':'hidden'}});
	var bilde = new Element('img', {src: pic_path, styles: { width:pic_width+"px"}});		
	bilde.inject(wraper);		
		
	var pic_title = new Element('div', {id:'img_text', 'class':'text', styles:{'color':'#3569a8', 'padding': '0px 3px;'}})
	pic_title.set('html', title);	
		
	var bilde_a = new Element('a', {'class':"hand_hover text", styles:{'background-color':'#e0e0e0', 'color':'#3569a8', 'float':'right', 'width': '70', 'line-height':'16px', 'padding':'2px 4px', 'margin-left':'5'}, href:EDIT_CORE.JSSiteRoot+'site/pages/download.php?filnavn='+org_path+'&fc='+(filename != ''?filename:title)+'.jpg', target:"_blank"});		
	bilde_a.set('html', 'Last ned');
	
	var controls_cont = new Element('div', {id:'controls_cont', styles:{'background-color':'#f7f7f7', 'text-align': 'left', 'height': '25', 'margin-top': '3', 'line-height':'20px'}});	
	controls_cont.inject(wraper);		
	bilde_a.inject(controls_cont);
	pic_title.inject(controls_cont);
	
	
	
	
	SqueezeBox.fromParams({handler:'div', size:{x:pic_width+0,y:pic_height+29}, div_cont:wraper, divOptions:{styles:{overflow:'hidden'}}, onClose:function(){
		var bilde_f = bilde;
		var wraper_f = wraper;
		delete bilde_f;
		delete wraper_f;		
	}});	
}
function flash_img_clicked(img_ind){
	var img_flash = $('flash_holder');
	var pic_width = parseInt(img_flash.get_tag_property(img_ind, 'big_img_src', 'width'));	
	var pic_height = parseInt(img_flash.get_tag_property(img_ind, 'big_img_src', 'height'));	
	var pic_src = img_flash.get_tag_value(img_ind, 'big_img_src');
	var wraper = new Element('div', {id:'img_wraper', styles:{width:pic_width+'px', 'overflow':'hidden'}});
	var bilde = new Element('img', {src: pic_src, styles: { width:pic_width+"px"}});	
	//var text_dic = new Element('div', {html:$(img).get('bilde_text'), styles:{height:'20px', 'overflow':'hidden'}});
	bilde.inject(wraper);	
	//text_dic.inject(wraper);	
	SqueezeBox.fromParams({handler:'div', size:{x:pic_width+0,y:pic_height}, div_cont:wraper, divOptions:{styles:{overflow:'hidden'}}, onClose:function(){
		var bilde_f = bilde;
		var wraper_f = wraper;
		delete bilde_f;
		delete wraper_f;		
	}});
}
function swf_name_replace(){
	var main_page_name_DOM = $('main_page_name');
	if (main_page_name_DOM == null) return;
	var name_size = main_page_name_DOM.getSize();
	var swf_params = {
		  bgcolor:"#ffffff",
		  wmode  :"transparent",
		  allowNetworking  :"all",
		  allowScriptAccess  :"always"
	  };
	var flashvars = {};
	flashvars.menu_text = $('main_page_name').get('html');	
	flashvars.standart_color = '0x636466';
	flashvars.menuTextAlign = 'left';
	flashvars.over_color = '0x636466';
	var swf_attr = {	  		
		styleclass :"main_page_title_obj",
		standby:"Laster ned",
		align:"left"
		};
	swfobject.embedSWF(EDIT_CORE.JSSiteRoot + 'site/main/swf/meny_text_left.swf', 
		'main_page_name', 
		name_size.x, 
		name_size.y, 
		"10.0.0", 
		EDIT_CORE.JSSiteRoot + "site/pages/html/flash_expressInstall", 
		flashvars, 
		swf_params, 
		swf_attr
	);
}
