function WM_imageSwap(daImage, daSrc){
	var objStr,obj;
	if(document.images){
		if (typeof daImage == 'string') {
			objStr = 'document.' + daImage;
			obj = eval(objStr);
			obj.src = daSrc;
		} else if ((typeof daImage == 'object') && daImage && daImage.src) {
			daImage.src = daSrc;
		}
	}
}

function opw(w,h,winX,x,y,st){return window.open('',winX,'toolbar='+(st?'1':'0')+',location=0,directories=0,status=0,menubar=0,scrollbars='+(st?'1':'0')+',resizable=0,width='+w+',height='+h+',top='+y+',left='+x);}

function mrw(w,h,winX,st){
	var x = (screen.width) ? (screen.width-w)/2 : 0;
	var y = (screen.height) ? (screen.height-h)/2 : 0;
	var win = opw(w,h,winX,x,y,st);
	if (win.resizeTo) win.resizeTo(w,h);
	if (win.moveTo) win.moveTo(x,y);
	if (win.innerHeight && (win.innerHeight != h || win.innerWidth != w) ) {
		win.close();
		win = opw(w,h,winX,x,y,st);
	}
	return win;
}

function open_window(url,w,h,winX,isimg){		
	if(isimg){
		w-=20;h-=20;		
		var win=mrw(w+10,h+29,winX);
		win.document.open();
		win.document.write(
			'<html><head><title></title><meta http-equiv="imagetoolbar" content="no"></head>'+
			'<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">'+
			'<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"><tr>'+
			'<td align="center" valign="middle"><img src="'+url+'" alt="" width="'+w+'" height="'+h+'" border="0"></td>'+
			'</tr></table></body></html>'
		);
		win.document.close();
	} else{
		url=url?url:'/index.html';
		winX=winX?winX:'Window';
		w=w?w+10:600;
		h=h?h+40:300;
		var win=mrw(w,h,winX);
		win.location = url;
	}
	if(win.window.focus){win.window.focus();}
}

function setMainLocation() {
    var u=document.navform.sel.options[document.navform.sel.selectedIndex].value;
    if(u)window.location=u;
}
					

