var active="RC1";
var priceRC1=34; //lite
var priceRC2=49; //plus
var priceRC3=59; //pro
var priceRC4=69; //duo
var priceRC5=34; //multi
var priceRC6=11; //nano
var priceRC7=34; //4her
var priceRC8=129; //power





function init() {
document.getElementById("RC1").style.left = "270px";
document.getElementById("RC1").style.top = "205px";
document.getElementById("RC1").style.zIndex = "5";
document.getElementById("RC1").style.backgroundImage = "url(http://www.pokerremotecontrol.com/images/RC1.jpg)";

document.getElementById("RC2").style.left = "120px";
document.getElementById("RC2").style.top = "167px";
document.getElementById("RC2").style.zIndex = "3";
document.getElementById("RC2").style.backgroundImage = "url(http://www.pokerremotecontrol.com/images/RC2.jpg)";

document.getElementById("RC3").style.left = "420px";
document.getElementById("RC3").style.top = "165px";
document.getElementById("RC3").style.zIndex = "3";
document.getElementById("RC3").style.backgroundImage = "url(http://www.pokerremotecontrol.com/images/RC3.jpg)";

document.getElementById("RC4").style.left = "60px";
document.getElementById("RC4").style.top = "115px";
document.getElementById("RC4").style.zIndex = "2";
document.getElementById("RC4").style.backgroundImage = "url(http://www.pokerremotecontrol.com/images/RC4.jpg)";

document.getElementById("RC5").style.left = "480px";
document.getElementById("RC5").style.top = "120px";
document.getElementById("RC5").style.zIndex = "2";

document.getElementById("RC6").style.left = "90px";
document.getElementById("RC6").style.top = "95px";
document.getElementById("RC6").style.zIndex = "1";

document.getElementById("RC7").style.left = "450px";
document.getElementById("RC7").style.top = "95px";
document.getElementById("RC7").style.zIndex = "1";

document.getElementById("RC8").style.left = "270px";
document.getElementById("RC8").style.top = "70px";
document.getElementById("RC8").style.zIndex = "0";


//document.PAYPAL.item_name.value = "Poker Remote Control Lite";
//document.PAYPAL.amount.value = priceRC1;


sp ("RC4");
if (document.cookie.length>0)
  {
  document.CP.coupon.value=document.cookie.substring(document.cookie.indexOf('AFFI=')+5) 
  }

document.getElementById("ABOUT").style.left="50px";

}






function sp(x) {

if (active != x) {

ot(x);

var templ=document.getElementById(x).style.left;
var tempt=document.getElementById(x).style.top;
var tempz=document.getElementById(x).style.zIndex;

document.getElementById(x).style.top = document.getElementById(active).style.top;
document.getElementById(x).style.left = document.getElementById(active).style.left;
document.getElementById(x).style.zIndex = document.getElementById(active).style.zIndex;

document.getElementById(active).style.top = tempt;
document.getElementById(active).style.left = templ;
document.getElementById(active).style.zIndex = tempz;

if (x == "RC1") {document.BUY.total.value="$"+priceRC1; document.PAYPAL.item_name.value = "1 Poker Remote Control Lite (Available Now)"; document.PAYPAL.amount.value = priceRC1; }
if (x == "RC2") {document.BUY.total.value="$"+priceRC2; document.PAYPAL.item_name.value = "1 Poker Remote Control Plus (Available Now)"; document.PAYPAL.amount.value = priceRC2; }
if (x == "RC3") {document.BUY.total.value="$"+priceRC3; document.PAYPAL.item_name.value = "1 Poker Remote Control Professional (PREORDER 2012)"; document.PAYPAL.amount.value = priceRC3; }
if (x == "RC4") {document.BUY.total.value="$"+priceRC4; document.PAYPAL.item_name.value = "1 Poker Remote Control Duo (Available Now)"; document.PAYPAL.amount.value = priceRC4; }
if (x == "RC5") {document.BUY.total.value="$"+priceRC5; document.PAYPAL.item_name.value = "1 Poker Remote Control Multi-Tabler (PREORDER 2010)"; document.PAYPAL.amount.value = priceRC5; }
if (x == "RC6") {document.BUY.total.value="$"+priceRC6; document.PAYPAL.item_name.value = "1 Poker Remote Control Nanno (PREORDER 2011)";document.PAYPAL.amount.value = priceRC6; }
if (x == "RC7") {document.BUY.total.value="$"+priceRC7; document.PAYPAL.item_name.value = "1 Poker Remote Control 4Her (PREORDER 2012)"; document.PAYPAL.amount.value = priceRC7; }
if (x == "RC8") {document.BUY.total.value="$"+priceRC8; document.PAYPAL.item_name.value = "1 Poker Remote Control Universal (PREORDER 2014)"; document.PAYPAL.amount.value = priceRC8; }

//8-powerpack
//if (x == "RC8") {document.BUY.total.value=""+(priceRC8); document.PAYPAL.item_name.value = "Poker Remote Control Power-Pack (Available Now)";document.PAYPAL.amount.value = priceRC8; document.getElementById('BN').style.left='818px'; document.getElementById('BN0').style.left='-5000px';}


active=x;
//checkCP();
}
} 


function checkCP()
{ 
if (document.cookie.length>0)
  {
  document.PAYPAL.custom.value=document.cookie.substring(document.cookie.indexOf('AFFI=')+5) 
  document.PAYPAL.amount.value = document.PAYPAL.amount.value - 4;
//alert(document.PAYPAL.amount.value);
  }
}




function ov(x) {
if (active != x) {
var y=parseInt(document.getElementById(x).style.top) - 10;
document.getElementById(x).style.top = y + "px";
}} 

function ot(x) {
if (active != x) {
var y=parseInt(document.getElementById(x).style.top) + 10;
document.getElementById(x).style.top = y + "px";
}} 



function hideImage (name) {
  var c = document.getElementById(name);
  c.style.left        = -5000+"px";
}

function hideAll () {
hideImage('ABOUT');
hideImage('INFO');
}



function showImage (name, x) {
  var c = document.getElementById(name);
  c.style.left        = x +"px";
}


function switchFnc (name) {
  var c = document.getElementById(name);
  var val = document.getElementById(name).style.backgroundImage;
if ( (val.indexOf('-b')) < 0) {
  c.style.backgroundImage = "url(http://www.pokerremotecontrol.com/images/"+name+"-b.jpg)";
}
else {
	c.style.backgroundImage = "url(http://www.pokerremotecontrol.com/images/"+name+".jpg)";
}

}
