

function NewWindow(mypage,myname,w,h,scroll){ 
	var win = null; 
	
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; 
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0; 
	
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable';
	
	win = window.open(mypage,myname,settings) 
	
	if(win.window.focus){win.window.focus();} 
} 



function popUp(strURL,strType,strHeight,strWidth,winName) {
	var strOptions="";
	if (strType=="console") strOptions="height="+strHeight+",width="+strWidth;
	if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
	if (strType=="elastic") strOptions="scrollbars,resizable,height="+strHeight+",width="+strWidth;
	window.open(strURL, winName, strOptions);
}

var mpopuppath

function changeimageinfo(id,detailpath,popuppath,plinkid) {

	mpopuppath=popuppath;
	
	var img = document.getElementById(id);
	
	img.src = detailpath;
	
	var plink = document.getElementById(plinkid);	

	
	if(detailpath==popuppath)
		{
			
		plink.style.visibility ='hidden';
		img.onclick=''
		}
	else{
		plink.style.visibility ='visible';
		img.onclick = changeLink;
		plink.onclick = changeLink;
		}
}


 function changeLink()
 {
	link = window.open('/DisplayLarge.aspx?path=' + mpopuppath,'image','height=800,width=1200,resizable=yes,toolbars=yes');
    
    }
