////5-13-10 paul
///added to new website


/////returns 'checked' for auto checking radio to match browser
function tocheck(myRegExp)
{
var answer = 'checked';

//var myRegExp = /Windows/;
//var myRegExp2 = /XP/;
//var myRegExp3 = /MAC/;

var string1 = navigator.appVersion;

if( string1.search(myRegExp)== -1)
	return 0;
else
	return answer ;
}




////finds which platform your browser is running, if true = windows
function whichbrow()
{
var myRegExp = /Windows/;
var string1 = navigator.appVersion;
var win=false;
if( string1.search(myRegExp)== -1)
	win=false;
else
	win=true;
return win;
}

////displays either windows or mac add to cart button
function whichPlatImage()
{
var winAddtoCart = "<img src=\"http://www.powerproduction.com/images/add_to_cart_btnW.jpg\"  border=0></a>"
var macAddtoCart = "<img src=\"http://www.powerproduction.com/images/add_to_cart_btnA.jpg\"  border=0></a>"

if ( whichbrow() )
	return winAddtoCart;
else
	return macAddtoCart ;
}

////this function returns the other platform link to cart, but not all the data
////all except the pid. product id is unique to each product
function otherTextLink(winpid,macpid)
{
var macTextLink = "<br>&nbsp;&nbsp;<a href=http://www.powerproduction.com/cart.php?productid="
	macTextLink = macTextLink + macpid ;
	macTextLink = macTextLink + ">Add Mac version instead</a>";

var winTextLink = "<br>&nbsp;&nbsp;<a href=http://www.powerproduction.com/cart.php?productid="
	winTextLink = winTextLink + winpid ;
	winTextLink = winTextLink + ">Add Windows version instead</a>";

if ( whichbrow() ) //windows = true, so return mac for instead choice
	return macTextLink ;
else
	return winTextLink ;
}


/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
function testplat()
{
var myRegExp = /Windows/;
var string1 = navigator.appVersion;

return string1;
}