// JavaScript Document
function dialogBoxGallery_Open(image_src){
	dialogBox_Show("dialogboxgallery");
		
		var container = document.getElementById("dialogboxgallery_content");
	
		if ( container.hasChildNodes() )
		{
			while ( container.childNodes.length >= 1 )
			{
				container.removeChild( container.firstChild );       
			} 
		}
		var NodeLink=document.createElement("a");
		NodeLink.setAttribute("href","javascript:dialogBoxGallery_Close();");
		var NodeImage=document.createElement("img");
		NodeImage.setAttribute("src",image_src);
		/*NodeImage.setAttribute("class","dialogboxgallery");*/
		NodeImage.setAttribute("style","border:10000px;");
		NodeLink.appendChild(NodeImage);
		container.appendChild(NodeLink);
}
function dialogBoxGallery_Close(){
	dialogBox_Hide("dialogboxgallery");
}

function dialogBox_Show(dialogbox_name){
	var  dialogbox;
	if(document.getElementById(dialogbox_name)) dialogbox=document.getElementById(dialogbox_name);
	else{
		dialogbox= document.createElement("div");
		dialogbox.setAttribute("id",dialogbox_name);
		dialogbox.className="dialogbox";
		
		background= document.createElement("div");
		background.setAttribute("id",dialogbox_name+"_background");
		background.className="dialogbox_background";
		dialogbox.appendChild(background);
		
		content= document.createElement("div");
		content.setAttribute("id",dialogbox_name+"_container");
		content.className="dialogbox_container";		
			table=document.createElement("table");
			table.setAttribute("cellpadding", "0");
			table.setAttribute("cellspacing", "0");
			table.className="dialogbox_container";
				tbody = document.createElement("tbody");
					toptr = document.createElement("tr");
						lefttd = document.createElement("td");
							lefttd.appendChild(document.createTextNode("\u00a0"));
						toptr.appendChild(lefttd);
						centerttd = document.createElement("td");
							centerttd.appendChild(document.createTextNode("\u00a0"));
						toptr.appendChild(centerttd);
						righttd = document.createElement("td");
							righttd.appendChild(document.createTextNode("\u00a0"));
						toptr.appendChild(righttd);
					tbody.appendChild(toptr);
					tr = document.createElement("tr");
						lefttd = document.createElement("td");
							lefttd.appendChild(document.createTextNode("\u00a0"));
						tr.appendChild(lefttd);
						td = document.createElement("td");				//CONTENT CELL
						/*td.setAttribute("id",dialogbox_name+"_content");*/
						td.className="dialogbox_content";
							div = document.createElement("div");	
							div.setAttribute("id",dialogbox_name+"_content");
							div.className="dialogbox_content";
							td.appendChild(div);
						tr.appendChild(td);
						righttd = document.createElement("td");
							righttd.appendChild(document.createTextNode("\u00a0"));
						tr.appendChild(righttd);
					tbody.appendChild(tr);
					bottomtr = document.createElement("tr");
						lefttd = document.createElement("td");
							lefttd.appendChild(document.createTextNode("\u00a0"));
						bottomtr.appendChild(lefttd);
						centerttd = document.createElement("td");
							centerttd.appendChild(document.createTextNode("\u00a0"));
						bottomtr.appendChild(centerttd);
						righttd = document.createElement("td");
							righttd.appendChild(document.createTextNode("\u00a0"));
						bottomtr.appendChild(righttd);
					tbody.appendChild(bottomtr);
				table.appendChild(tbody);
			content.appendChild(table);
		dialogbox.appendChild(content);
		
		/*
		TABLETABLE=document.createElement("table");
		TABLETABLE.setAttribute("cellpadding", "0");
		TABLETABLE.setAttribute("cellspacing", "0");
		TABLETABLE.className="dialogbox";
		
		
		html2dom_root_1_table = document.createElement("tbody");
		TABLETABLE.appendChild(html2dom_root_1_table);
		
		
			html2dom_root_1_table_2_tr = document.createElement("tr");
				html2dom_root_1_table_2_tr_2_td = document.createElement("td");
					html2dom_root_1_table_2_tr_2_td.className="dialogbox_opaque";
					html2dom_root_1_table_2_tr_2_td.appendChild(document.createTextNode("\u00a0"));//&nbsp;
				html2dom_root_1_table_2_tr.appendChild(html2dom_root_1_table_2_tr_2_td);
				html2dom_root_1_table_2_tr_4_td = document.createElement("td");
					html2dom_root_1_table_2_tr_4_td.className="dialogbox_opaque";
					html2dom_root_1_table_2_tr_4_td.appendChild(document.createTextNode("\u00a0"));
				html2dom_root_1_table_2_tr.appendChild(html2dom_root_1_table_2_tr_4_td);
				html2dom_root_1_table_2_tr_6_td = document.createElement("td");
					html2dom_root_1_table_2_tr_6_td.className="dialogbox_opaque";
					html2dom_root_1_table_2_tr_6_td.appendChild(document.createTextNode("\u00a0"));
				html2dom_root_1_table_2_tr.appendChild(html2dom_root_1_table_2_tr_6_td);
				html2dom_root_1_table_2_tr_8_td = document.createElement("td");
					html2dom_root_1_table_2_tr_8_td.className="dialogbox_opaque";
					html2dom_root_1_table_2_tr_8_td.appendChild(document.createTextNode("\u00a0"));
				html2dom_root_1_table_2_tr.appendChild(html2dom_root_1_table_2_tr_8_td);
				html2dom_root_1_table_2_tr_10_td = document.createElement("td");
					html2dom_root_1_table_2_tr_10_td.className="dialogbox_opaque";
					html2dom_root_1_table_2_tr_10_td.appendChild(document.createTextNode("\u00a0"));
				html2dom_root_1_table_2_tr.appendChild(html2dom_root_1_table_2_tr_10_td);
			html2dom_root_1_table.appendChild(html2dom_root_1_table_2_tr);
			html2dom_root_1_table_4_tr = document.createElement("tr");
				html2dom_root_1_table_4_tr_1_td = document.createElement("td");
					html2dom_root_1_table_4_tr_1_td.className="dialogbox_opaque";
				html2dom_root_1_table_4_tr.appendChild(html2dom_root_1_table_4_tr_1_td);
				html2dom_root_1_table_4_tr_2_td = document.createElement("td");
					html2dom_root_1_table_4_tr_2_td.className="dialogbox_opaque";
					html2dom_root_1_table_4_tr_2_td.setAttribute("width", "3");
					html2dom_root_1_table_4_tr_2_td.setAttribute("height", "3");
					html2dom_root_1_table_4_tr_2_td_1_img = document.createElement("img");
						html2dom_root_1_table_4_tr_2_td_1_img.setAttribute("src", "../common/dialogbox_topleft.gif");
						html2dom_root_1_table_4_tr_2_td_1_img.setAttribute("width", "3");
						html2dom_root_1_table_4_tr_2_td_1_img.setAttribute("height", "3");
					html2dom_root_1_table_4_tr_2_td.appendChild(html2dom_root_1_table_4_tr_2_td_1_img);
				html2dom_root_1_table_4_tr.appendChild(html2dom_root_1_table_4_tr_2_td);
				html2dom_root_1_table_4_tr_3_td = document.createElement("td");
					html2dom_root_1_table_4_tr_3_td.setAttribute("height", "3");
					html2dom_root_1_table_4_tr_3_td.style.backgroundColor="#FFFFFF";
					html2dom_root_1_table_4_tr_3_td_1_img = document.createElement("img");
						html2dom_root_1_table_4_tr_3_td_1_img.setAttribute("src", "../common/spacer.gif");
						html2dom_root_1_table_4_tr_3_td_1_img.setAttribute("width", "3");
						html2dom_root_1_table_4_tr_3_td_1_img.setAttribute("height", "3");
					html2dom_root_1_table_4_tr_3_td.appendChild(html2dom_root_1_table_4_tr_3_td_1_img);
				html2dom_root_1_table_4_tr.appendChild(html2dom_root_1_table_4_tr_3_td);
				html2dom_root_1_table_4_tr_4_td = document.createElement("td");
					html2dom_root_1_table_4_tr_4_td.className="dialogbox_opaque";
					html2dom_root_1_table_4_tr_4_td.setAttribute("width", "3");
					html2dom_root_1_table_4_tr_4_td.setAttribute("height", "3");
					html2dom_root_1_table_4_tr_4_td_1_img = document.createElement("img");
						html2dom_root_1_table_4_tr_4_td_1_img.setAttribute("src", "../common/dialogbox_topright.gif");
						html2dom_root_1_table_4_tr_4_td_1_img.setAttribute("width", "3");
						html2dom_root_1_table_4_tr_4_td_1_img.setAttribute("height", "3");
					html2dom_root_1_table_4_tr_4_td.appendChild(html2dom_root_1_table_4_tr_4_td_1_img);
				html2dom_root_1_table_4_tr.appendChild(html2dom_root_1_table_4_tr_4_td);
				html2dom_root_1_table_4_tr_5_td = document.createElement("td");
					html2dom_root_1_table_4_tr_5_td.className="dialogbox_opaque";
				html2dom_root_1_table_4_tr.appendChild(html2dom_root_1_table_4_tr_5_td);
			html2dom_root_1_table.appendChild(html2dom_root_1_table_4_tr);
			html2dom_root_1_table_6_tr = document.createElement("tr");
				html2dom_root_1_table_6_tr_1_td = document.createElement("td");
					html2dom_root_1_table_6_tr_1_td.className="dialogbox_opaque";
					html2dom_root_1_table_6_tr_1_td.appendChild(document.createTextNode("\u00a0"));
				html2dom_root_1_table_6_tr.appendChild(html2dom_root_1_table_6_tr_1_td);
				html2dom_root_1_table_6_tr_2_td = document.createElement("td");
					html2dom_root_1_table_6_tr_2_td.setAttribute("width", "3");
					html2dom_root_1_table_6_tr_2_td.style.backgroundColor="#FFFFFF";
					html2dom_root_1_table_6_tr_2_td_1_img = document.createElement("img");
						html2dom_root_1_table_6_tr_2_td_1_img.setAttribute("src", "../common/spacer.gif");
						html2dom_root_1_table_6_tr_2_td_1_img.setAttribute("width", "3");
						html2dom_root_1_table_6_tr_2_td_1_img.setAttribute("height", "3");
					html2dom_root_1_table_6_tr_2_td.appendChild(html2dom_root_1_table_6_tr_2_td_1_img);
				html2dom_root_1_table_6_tr.appendChild(html2dom_root_1_table_6_tr_2_td);
				html2dom_root_1_table_6_tr_3_td = document.createElement("td");
					html2dom_root_1_table_6_tr_3_td.className="dialogbox";
					html2dom_root_1_table_6_tr_3_td.setAttribute("id", dialogbox_name+"_content");
				html2dom_root_1_table_6_tr.appendChild(html2dom_root_1_table_6_tr_3_td);
				html2dom_root_1_table_6_tr_4_td = document.createElement("td");
					html2dom_root_1_table_6_tr_4_td.setAttribute("width", "3");
					html2dom_root_1_table_6_tr_4_td.style.backgroundColor="#FFFFFF";
					html2dom_root_1_table_6_tr_4_td_1_img = document.createElement("img");
						html2dom_root_1_table_6_tr_4_td_1_img.setAttribute("src", "../common/spacer.gif");
						html2dom_root_1_table_6_tr_4_td_1_img.setAttribute("width", "3");
						html2dom_root_1_table_6_tr_4_td_1_img.setAttribute("height", "3");
					html2dom_root_1_table_6_tr_4_td.appendChild(html2dom_root_1_table_6_tr_4_td_1_img);
				html2dom_root_1_table_6_tr.appendChild(html2dom_root_1_table_6_tr_4_td);
				html2dom_root_1_table_6_tr_5_td = document.createElement("td");
					html2dom_root_1_table_6_tr_5_td.className="dialogbox_opaque";
					html2dom_root_1_table_6_tr_5_td.appendChild(document.createTextNode("\u00a0"));
				html2dom_root_1_table_6_tr.appendChild(html2dom_root_1_table_6_tr_5_td);
			html2dom_root_1_table.appendChild(html2dom_root_1_table_6_tr);
			html2dom_root_1_table_7_tr = document.createElement("tr");
				html2dom_root_1_table_7_tr_1_td = document.createElement("td");
					html2dom_root_1_table_7_tr_1_td.className="dialogbox_opaque";
				html2dom_root_1_table_7_tr.appendChild(html2dom_root_1_table_7_tr_1_td);
				html2dom_root_1_table_7_tr_2_td = document.createElement("td");
					html2dom_root_1_table_7_tr_2_td.className="dialogbox_opaque";
					html2dom_root_1_table_7_tr_2_td.setAttribute("height", "3");
					html2dom_root_1_table_7_tr_2_td.setAttribute("width", "3");
					html2dom_root_1_table_7_tr_2_td_1_img = document.createElement("img");
						html2dom_root_1_table_7_tr_2_td_1_img.setAttribute("src", "../common/dialogbox_downleft.gif");
						html2dom_root_1_table_7_tr_2_td_1_img.setAttribute("width", "3");
						html2dom_root_1_table_7_tr_2_td_1_img.setAttribute("height", "3");
					html2dom_root_1_table_7_tr_2_td.appendChild(html2dom_root_1_table_7_tr_2_td_1_img);
				html2dom_root_1_table_7_tr.appendChild(html2dom_root_1_table_7_tr_2_td);
				html2dom_root_1_table_7_tr_3_td = document.createElement("td");
					html2dom_root_1_table_7_tr_3_td.setAttribute("height", "3");
					html2dom_root_1_table_7_tr_3_td.style.backgroundColor="#FFFFFF";
					html2dom_root_1_table_7_tr_3_td_1_img = document.createElement("img");
						html2dom_root_1_table_7_tr_3_td_1_img.setAttribute("src", "../common/spacer.gif");
						html2dom_root_1_table_7_tr_3_td_1_img.setAttribute("width", "3");
						html2dom_root_1_table_7_tr_3_td_1_img.setAttribute("height", "3");
					html2dom_root_1_table_7_tr_3_td.appendChild(html2dom_root_1_table_7_tr_3_td_1_img);
				html2dom_root_1_table_7_tr.appendChild(html2dom_root_1_table_7_tr_3_td);
				html2dom_root_1_table_7_tr_4_td = document.createElement("td");
					html2dom_root_1_table_7_tr_4_td.className="dialogbox_opaque";
					html2dom_root_1_table_7_tr_4_td.setAttribute("height", "3");
					html2dom_root_1_table_7_tr_4_td.setAttribute("width", "3");
					html2dom_root_1_table_7_tr_4_td_1_img = document.createElement("img");
						html2dom_root_1_table_7_tr_4_td_1_img.setAttribute("src", "../common/dialogbox_downright.gif");
						html2dom_root_1_table_7_tr_4_td_1_img.setAttribute("width", "3");
						html2dom_root_1_table_7_tr_4_td_1_img.setAttribute("height", "3");
					html2dom_root_1_table_7_tr_4_td.appendChild(html2dom_root_1_table_7_tr_4_td_1_img);
				html2dom_root_1_table_7_tr.appendChild(html2dom_root_1_table_7_tr_4_td);
				html2dom_root_1_table_7_tr_5_td = document.createElement("td");
					html2dom_root_1_table_7_tr_5_td.className="dialogbox_opaque";
				html2dom_root_1_table_7_tr.appendChild(html2dom_root_1_table_7_tr_5_td);
			html2dom_root_1_table.appendChild(html2dom_root_1_table_7_tr);
			html2dom_root_1_table_9_tr = document.createElement("tr");
				html2dom_root_1_table_9_tr_1_td = document.createElement("td");
					html2dom_root_1_table_9_tr_1_td.className="dialogbox_opaque";
					html2dom_root_1_table_9_tr_1_td.appendChild(document.createTextNode("\u00a0"));
				html2dom_root_1_table_9_tr.appendChild(html2dom_root_1_table_9_tr_1_td);
				html2dom_root_1_table_9_tr_2_td = document.createElement("td");
					html2dom_root_1_table_9_tr_2_td.className="dialogbox_opaque";
					html2dom_root_1_table_9_tr_2_td.appendChild(document.createTextNode("\u00a0"));
				html2dom_root_1_table_9_tr.appendChild(html2dom_root_1_table_9_tr_2_td);
				html2dom_root_1_table_9_tr_3_td = document.createElement("td");
					html2dom_root_1_table_9_tr_3_td.className="dialogbox_opaque";
					html2dom_root_1_table_9_tr_3_td.appendChild(document.createTextNode("\u00a0"));
				html2dom_root_1_table_9_tr.appendChild(html2dom_root_1_table_9_tr_3_td);
				html2dom_root_1_table_9_tr_4_td = document.createElement("td");
					html2dom_root_1_table_9_tr_4_td.className="dialogbox_opaque";
					html2dom_root_1_table_9_tr_4_td.appendChild(document.createTextNode("\u00a0"));
				html2dom_root_1_table_9_tr.appendChild(html2dom_root_1_table_9_tr_4_td);
				html2dom_root_1_table_9_tr_5_td = document.createElement("td");
					html2dom_root_1_table_9_tr_5_td.className="dialogbox_opaque";
					html2dom_root_1_table_9_tr_5_td.appendChild(document.createTextNode("\u00a0"));
				html2dom_root_1_table_9_tr.appendChild(html2dom_root_1_table_9_tr_5_td);
			html2dom_root_1_table.appendChild(html2dom_root_1_table_9_tr);

		dialogbox.appendChild(TABLETABLE);
		*/
		document.getElementById("frame_header").appendChild(dialogbox);
	}
	document.getElementById(dialogbox_name).style.display="";
}
function dialogBox_Hide(dialogbox_name){
	document.getElementById(dialogbox_name).style.display="none";
}

