   var  wordpressProductName = new Array();
	var wordpressProductOption = new Array();	//0 = None, 1 = Quantity, 2 = Coded 
	var wordpressProductPrice = new Array();	
	var wordpressProductPSDPrice = new Array();	
	var wordpressPCoded = new Array();

	wordpressProductName[0]		= "Custom Wordpress Theme";
	wordpressProductOption[0]	= 1;
	wordpressProductPrice[0]	= 267;
	wordpressProductPSDPrice[0]	= 0;
	
function Displaywordpressstable()
	  {
	var ProdOpt		= "";
	var ProdPrices	= ""; 
document.write("<form action=\"step3.php\" method=\"post\">\n <table width=\"95%\"  border=\"0\" cellspacing=\"1\" class=\"DispTable\" cellpadding=\"2\" align=\"center\">");

document.write("<tr><td width=\"252\" align=\"center\" valign=\"middle\" class=\"iq-bg1\">wordpress</td><td width=\"76\" align=\"center\" valign=\"middle\" class=\"iq-bg2\">Add</td><td width=\"96\" align=\"center\" valign=\"middle\" class=\"iq-bg3\">Add PSD</td><td width=\"96\" align=\"center\" valign=\"middle\" class=\"iq-bg4\">Qty</td><td align=\"center\" width=\"72\" valign=\"middle\" class=\"iq-bg5\">Price</td><td align=\"center\" width=\"84\" valign=\"middle\" class=\"iq-bg5\">Price with PSD</td></tr>");

for(var Id in wordpressProductName)
     {
  switch(wordpressProductOption[Id]) 
	   {
case 0: wordpressProdOpt = ""; break;
case 1: wordpressProdOpt = "<select name=\"Data4["+Id+"][Qty4]\" onchange=\"DisplaywordpressPrices()\"><option value=\"1\">1</option><option value=\"2\">2</option><option value=\"3\">3</option><option value=\"4\">4</option><option value=\"5\">5</option></select>"; break;
case 2: wordpressProdOpt = "<input type=\"checkbox\" name=\"Data2["+Id+"][Coded]\" value=\""+wordpressPCoded[Id]+"\" onchange=\"DisplaywordpressPrices()\" > Coded"; break;
		   }
 
document.write("<tr>\n"); 
document.write("<td width=\"252\"  class=\"iq-bg7\" align=\"left\" valign=\"middle\" nowrap=\"nowrap\">"+wordpressProductName[Id]+"</td>\n");
			
document.write("<td width=\"76\" align=\"center\" class=\"iq-bg8\"><input type=\"checkbox\"  name=\"Data["+Id+"][Select]\" value=\"3\" id=\"Sel"+Id+"9\" onchange=\"DisplaywordpressPrices()\" /></td>\n");
			
document.write("<td width=\"96\" align=\"center\" class=\"iq-bg9\"><input type=\"checkbox\"  name=\"Data["+Id+"][Select]\" value=\"4\" id=\"Sel"+Id+"10\" onchange=\"DisplaywordpressStaticPrices()\" /></td>\n");
			
document.write("<td width=\"96\"  align=\"center\" class=\"iq-bg10\">"+wordpressProdOpt+"</td>\n");
document.write("<td  width=\"72\" align=\"center\" class=\"iq-bg11\" id=\"wordpressPricer"+Id+"\"></td>\n");
document.write("<td  width=\"84\" align=\"center\" class=\"iq-bg12\" id=\"wordpressPrice"+Id+"\"></td>\n");
document.write("<td  class=\"DispHelp\"></td>\n");
document.write("</tr>\n");
ProdPrices += "	<input type=\"hidden\" name=\"Data["+Id+"][Price]\" value=\""+wordpressProductPrice[Id]+"\" />\n	<input type=\"hidden\" name=\"Data["+Id+"][Name]\" value=\""+wordpressProductName[Id]+"\" />";
	}
document.write("<tr><td colspan=\"5\">&nbsp;&nbsp;&nbsp;Price Total: <span id=\"wordpressPriTotal\"></span></td></tr>\n");
document.write("<tr><td colspan=\"5\">&nbsp;&nbsp;&nbsp;USD Price Total: <span id=\"wordpressPriPSDTotal\"></span></td></tr>\n");
document.write("</table>\n");
document.write(""+wordpressProdPrices+"\n");
document.write("</form>\n");
 }
 
function DisplaywordpressPrices()
   { 
 var wordpressTotPrice = 0;
	for(var Id in wordpressProductPrice)
	   {
		if(document.getElementById("Sel"+Id+"9").checked)
		   {
			if(wordpressProductOption[Id] == 1)
			  {
document.getElementById("wordpressPricer"+Id).innerHTML = "$" + (wordpressProductPrice[Id] * document.getElementsByName("Data4["+Id+"][Qty4]")[0].value);
				wordpressTotPrice += (wordpressProductPrice[Id] * document.getElementsByName("Data4["+Id+"][Qty4]")[0].value);
	
	  			  }else if(wordpressProductOption[Id] == 2 && document.getElementsByName("Data4["+Id+"][Coded]")[0].checked)
				   {
					   
					document.getElementById("wordpressPricer"+Id).innerHTML = "$" + (wordpressProductPrice[Id] + wordpressPCoded[Id]);
					wordpressTotPrice += (wordpressProductPrice[Id] + wordpressPCoded[Id]);
				   }else{
					document.getElementById("wordpressPricer"+Id).innerHTML = "$" + wordpressProductPrice[Id];
					wordpressTotPrice += wordpressProductPrice[Id];
				   }
		}else{
				document.getElementById("wordpressPricer"+Id).innerHTML = "";
			}
   }
		document.getElementById("wordpressPriTotal").innerHTML = "$" + wordpressTotPrice;
}


function DisplaywordpressStaticPrices()
	  { 
	   //alert ("hello");
		var wordpressTotPSDPrice = 0;
		for(var Id in wordpressProductPSDPrice)
		  {
			if(document.getElementById("Sel"+Id+"10").checked)
			  {
			   // alert ("Sel"+Id+"1");
				 	document.getElementById("wordpressPrice"+Id).innerHTML = "$" + wordpressProductPSDPrice[Id];
					wordpressTotPSDPrice += wordpressProductPSDPrice[Id];
	  		   }else{
				document.getElementById("wordpressPrice"+Id).innerHTML = "";
			}
       }
		document.getElementById("wordpressPriPSDTotal").innerHTML = "$" + wordpressTotPSDPrice;
    }