function popup(url){
	var ww=650,wh=500,pos;
	sw=screen.width;
	sh=screen.height;
	wbx=Math.round((sw-ww)/2);
	wby=Math.round((sh-wh)/2);
	pos="left="+wbx+",top="+wby+",";
	newWin=window.open('/'+url,"sample",
	"width="+ww+",height="+wh+","+pos+
	"toolbar=no,"+
	"bar=no,"+
	"location=no,"+
	"status=no,"+
	"menubar=no,"+
	"scrollbars=no,"+
	"resizable=0");
}

function i(n){
	if(n==cur_wp) return;
	m=document.getElementById('w'+n);
	if(m.className=='g1') m.className='g2';
	else m.className='g1';
}

function g(n){
	if(n.className=='g1') n.className='g2';
	else n.className='g1';
}

function wp(n){
	document.getElementById('preview').src=pre[n].src;
	document.getElementById('curlink').innerHTML=d[n];
	document.getElementById('w'+cur_wp).className='g1';
	document.getElementById('w'+n).className='g2';
	cur_wp=n;
}