<!--
//

// set dynamic coords
function get_mouse(e)
{
	var x,y;

	if(nav || n_6)
	{
		x=e.pageX;
	}
	if(iex)
	{
		x=event.x+document.body.scrollLeft;
	}
	
	if(nav || n_6)
	{
		y=e.pageY;
	}
	if(iex)
	{
		y=event.y;
		if(navigator.appVersion.indexOf("MSIE 4")==-1)
		{
			y+=document.body.scrollTop;
		}
	}

	if(iex || nav)
	{
		skin.top=y+yyy;
		skin.left=x+Xoffset; 
	}

	if(n_6)
	{
		skin.top=(y+yyy)+"px";
		skin.left=x+Xoffset+"px";
	}		
	nudge(x);
}

// avoid edge overflow
function nudge(x)
{
	var extreme,overflow,temp;

	// right
	if(iex)
	{
		extreme=(document.body.clientWidth-popwidth);
	}
	if(n_6 || nav)
	{
		extreme=(window.innerWidth-popwidth);
	}

	if(parseInt(skin.left)>extreme)
	{
		overflow=parseInt(skin.left)-extreme;
		temp=parseInt(skin.left);
		temp-=overflow;
		if(nav || iex)
		{
			skin.left=temp;
		}
		if(n_6)
		{
			skin.left=temp+"px";
		}
	}

	// left
	if(parseInt(skin.left)<1)
	{
		overflow=parseInt(skin.left)-1;
		temp=parseInt(skin.left);
		temp-=overflow;
		if(nav || iex)
		{
			skin.left=temp;
		}
		if(n_6)
		{
			skin.left=temp+"px";
		}
	}
}

// write content & display
function popup(id, modelname, optionslist, modelinfo, age)
{
	getObj(id).style.backgroundColor = '#f7eedc';

	var content="<div class='window'>"+
	"<h1>"+modelname+"</h1>";

	content += "<p>";

	if (modelinfo.length > 0)
	{
		content += "<p>"+modelinfo+"</p>";
	}

	if (age.length > 0)
	{
		content += "<p>Age: "+age+"</p>";
	}

//	if (modelinfo.length > 0 && optionslist.length > 0)
//	{
		content += '<hr />';
//	}
	
	if (optionslist.length > 0)
	{
		content += '<p>'+optionslist+'</p>';
	}
	
	content += "</p>"+"</p>";

	if(old)
	{
		alert(msg);
		return;
	} 
	 
	yyy=Yoffset; 
	skin.width=popwidth;

	if(nav)
	{ 
		skin.document.open();
		skin.document.write(content);
		skin.document.close();
		skin.visibility="visible";
	}

	if(iex)
	{				
		pup.innerHTML=content;
		skin.visibility="visible";
	}	

	if(n_6)
	{	 
		document.getElementById("pup").innerHTML=content;
		skin.visibility="visible";
	}
}


// park content box
function kill(id)
{
	if(!old)
	{
		getObj(id).style.backgroundColor = '#E0E0E0';

		yyy=-1000;
		skin.visibility="hidden";
		skin.width=0;
	}
}

//
//-->
