// JavaScript Document

function nextDemo(current){nextDemo2(current,"");}

function nextDemo2(current, pathtove3d)
{ 
	demo = new Array("ring", "dice", "sunglasses","mp3Player","bottle","chair","glass","compact","counter");
	for(i=0;i<demo.length;i++)
	if(demo[i] == current)
		break;
	//if(++i>=demo.length)
		//i=0;
		//document.write(current+" ; "+demo[i]);
	
	//document.write('<tr><td align="left" class="headertext"> Try these other demos:</td><td>');
	//document.write(pathtove3d+demo[0]);
	document.write('<tr> <td height="34" width="750"> <table width="750"> <tr> ');
    document.write('<td width="10" align="left" class="bodytext"></td><td align="center" width="750">');
		  
	for(j=0;j<demo.length;j++) 
	{
		border = 1;
		vspace = 2;
		if(j==i)
		{
			border =2;
			vspace =0
		}
		document.write('<a href="'+pathtove3d+demo[j]+'.php"><img src="'+pathtove3d+'images/demothumb/'+demo[j]+'.jpg" hspace="4" vspace="'+vspace+'" border="'+border+'"></a>');
	}
	document.write('</td></tr></table></td></tr>');
	//document.write(' </td></tr>');
}

function changeLevel(levelname)
{
	if(document.applets.ve3d)
		document.applets.ve3d.pjs(131074, levelname);//0x20002
}



var VE3DWindow



function openAppletWin(w, h, m)
{
	iw=w
	ih=h
	
	screenw = window.screen.availWidth
	screenh = window.screen.availHeight
	if(screenw < 100)
	{
		screenw = 400
		screenh = 400
	}
			
	wn = w+8
	hn = h+55
	VE3DWindow = window.open('inpop.php?iw='+iw+'&ih='+ih+'&w='+screenw+'&h='+screenh+'&m='+m, 'VisionWeb3D',
		config='resizable=yes,width='+wn+',height='+hn+',scrollbars=no,toolbars=no,status=no')
	VE3DWindow.resizeTo(wn,hn)
	VE3DWindow.focus()
	VE3DWindow.zIndex = 0	
}
