var id=0;
function PrevNextClass( option , count ) {
	
	if(option == 'next' && id != count-5 ) { id = id+1; document.getElementById('PrevButton').className = 'fl prev'; }
	if(option == 'prev' && id != 0 ) { id = id-1; document.getElementById('NextButton').className = 'fl next'; }

		if( id == count-5 ) { document.getElementById('NextButton').className = 'fl next off'; }
		if( id == 0 ) { document.getElementById('PrevButton').className = 'fl prev off'; }
}


function showtab( id ) {
	document.getElementById( id ).style.display = '';
//#$( id ).show('fast');
}

function hidetab( id ) {
	document.getElementById( id ).style.display = 'none';
//	$( id ).hide();
}

function showpricetab( id ) {
	
	$( id ).show('fast');
	mouseDivTip( id );
}

function hidepricetab( id ) {
	$( id ).hide();
}

var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
win.focus();}


var xpos=0;
var ypos=0;

if (navigator.appName == 'Netscape') {
    document.captureEvents(Event.MOUSEMOVE);
}

document.onmousemove = mauspos;

function mauspos(e) {
        if (navigator.appName == 'Netscape') {
           xpos = e.pageX;
           ypos = e.pageY;
        } else {
           xpos = window.event.x;
           ypos = window.event.y;
        }
}

function mouseDivTip( id ) {
	document.getElementById( id ).style = 'position:relative;margin-left:' + xpos + 'px;top' + ypos + ':px;';

}

var cX = 0; var cY = 0; var rX = 0; var rY = 0;
function UpdateCursorPosition(e){ cX = e.pageX; cY = e.pageY;}
function UpdateCursorPositionDocAll(e){ cX = event.clientX; cY = event.clientY;}
if(document.all) { document.onmousemove = UpdateCursorPositionDocAll; } else { document.onmousemove = UpdateCursorPosition; }

function AssignPosition(d) {
if(self.pageYOffset) {
	rX = self.pageXOffset;
	rY = self.pageYOffset;
	}
else if(document.documentElement && document.documentElement.scrollTop) {
	rX = document.documentElement.scrollLeft;
	rY = document.documentElement.scrollTop;
	}
else if(document.body) {
	rX = document.body.scrollLeft;
	rY = document.body.scrollTop;
	}
if(document.all) {
	cX += rX; 
	cY += rY;
	}
d.style.left = (cX+10) + "px";
d.style.top = (cY+10) + "px";
}
function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
if(d.length < 1) { return; }
var dd = document.getElementById(d);
AssignPosition(dd);
dd.style.display = "block";
}
function ReverseContentDisplay(d) {
if(d.length < 1) { return; }
var dd = document.getElementById(d);
AssignPosition(dd);
if(dd.style.display == "none") { dd.style.display = "block"; }
else { dd.style.display = "none"; }
}