function showWindow(id,path,width,height,windowTitle,reload_value){
	document.getElementById(id).firstChild.style.width=document.documentElement.clientWidth;
	if (navigator.userAgent.indexOf("MSIE 6.0") != -1) {
		document.getElementById(id).firstChild.style.height=document.body.clientHeight;
	}
	/*
	var tgArray=document.getElementsByTagName("ul");
	for (var i=0;i<tgArray.length;i++){
		tgArray[i].style.visibility="hidden";
	}
	
	var tgArray2=document.getElementById(id).getElementsByTagName("*");
	for (var i=0;i<tgArray2.length;i++){
		if (typeof(tgArray2[i])!="undefined" && (tgArray2[i].className.indexOf("hideTemp") != -1 || tgArray2[i].className.indexOf("calendarShow") != -1)) {
			tgArray2[i].style.visibility="visible";
			tgArray2[i].className.replace(" hideTemp","");
		}
	}
	var tgArray3=document.getElementsByTagName("select");
	for (var i=0;i<tgArray3.length;i++){
		if (!(tgArray3[i].className.indexOf("filter") != -1)){
			tgArray3[i].style.visibility="hidden";
		}
	}*/
	document.getElementById(id+'windowTitleLabel').value=windowTitle;
	document.getElementById(id+'windowTitle').innerHTML=windowTitle;
	document.getElementById(id+"iframe").style.width=width+10+"px";
	document.getElementById(id+"iframe").style.height=height+10+"px";
	document.getElementById(id+"iframe").src=path;
	document.getElementById(id+"close_span").onclick=function() {
		closeWindow(id,reload_value);
	}
	window.scrollBy(0, 1);
	resizeWindow(id);
	document.getElementById(id).style.visibility='visible';
}
function resizeWindow(id){
	document.getElementById('win'+id).style.top=Math.floor((document.documentElement.clientHeight-document.getElementById('win'+id).offsetHeight)/2)+"px";
	document.getElementById('win'+id).style.right=Math.floor((document.documentElement.clientWidth-document.getElementById('win'+id).offsetWidth)/2)+"px";
	document.getElementById(id).firstChild.style.width=document.documentElement.clientWidth;
	if (navigator.userAgent.indexOf("MSIE 6.0") != -1) {
		document.getElementById(id).firstChild.style.height=document.body.clientHeight;
	}
}
function closeWindow(id,reload_value){
	document.getElementById(id+"iframe").src="";
	if(reload_value==true)
		Reload();
	document.getElementById(id).style.visibility="hidden";
	/*
	var tgArray=document.getElementsByTagName("ul");
	for (var i=0;i<tgArray.length;i++){
		tgArray[i].style.visibility="visible";
	}
	var tgArray2=document.getElementById(id).getElementsByTagName("*");
	for (var i=0;i<tgArray2.length;i++){
		if (typeof(tgArray2[i])!="undefined" && tgArray2[i].style.visibility=="visible"){
			tgArray2[i].style.visibility="hidden";
			tgArray2[i].className+=" hideTemp";
		}
	}
	var tgArray3=document.getElementsByTagName("select");
	for (var i=0;i<tgArray3.length;i++){
		if (!(tgArray3[i].className.indexOf("filter") != -1)){
			tgArray3[i].style.visibility="visible";
		}
	}*/
	window.scrollBy(0, -1);
}
function createWindow(id,closeTitle){
	var div=document.createElement("div");
	div.id=id;
	div.className="window";
		var div1=document.createElement("div");
		div1.className="windowBackground";
		div1.style.position='absolute';
		if (navigator.userAgent.indexOf("MSIE 6.0") == -1) {
			div1.style.position='fixed';
			div1.style.height='100%';
			div1.style.width='100%';
		}
		
		var div2=document.createElement("div");
		div2.id='win'+id;
		div2.style.position='absolute';
		if (navigator.userAgent.indexOf("MSIE 6.0") == -1) {
			div2.style.position='fixed';
		}
		div2.className="windowW";
			var div3=document.createElement("div");
			div3.className="title";
			//div3.id='windowTitle';
			var label=document.createElement("label");
			label.id=id+'windowTitleLabel';
			//div3.innerHTML=windowTitle;
			var span_title=document.createElement("span");
			span_title.id=id+'windowTitle';
			var span1=document.createElement("span");
			span1.id=id+"close_span";
				span1.className="closeButton";
				span1.title=closeTitle;
			var div4=document.createElement("div");
			div4.className="windowBody";
				var iframe=document.createElement("iframe");
				iframe.name=id+"iframe";
				iframe.id=id+"iframe";
				iframe.style.padding="5px";
				iframe.border="0";
				iframe.frameborder="0";
		div.appendChild(div1);
		div3.appendChild(span_title);
		div3.appendChild(label);
		div3.appendChild(span1);
		div4.appendChild(iframe);
		div2.appendChild(div3);
		div2.appendChild(div4);
		div.appendChild(div2);
		return div;
}
function Reload(){
	document.location.href=document.location.href;
}
