// JavaScript Document

var ecom = new Array('Custom Ecommerce','CREloaded','CS Cart', 'Cube Cart', 'Magento','Oscommerce','Prestashop' ,'X-cart', 'Zen Cart');
var app_soft_dev = new Array('demo1', 'demo2', 'demo3');
var sem = new Array('Article Submission','Directory Submission', 'Link Exchange','SEO');
var domain_reg = new Array('Domain Registration', 'Domain Renew', 'Domain Transfer');
var flash_anim = new Array('flash1', 'flash2', 'flash3');
var web_devlop = new Array('Blog','Custom CMS','Dotnetnuke','ERP and CRM Solutions','Financial Accounting','Forum','Hospital Management', 'Joomla', 'Kentico CMS','Mambo','Online Hotel Reseravation','PHPNuke','School and Sollege Automation','Social Network','Static Website Development','Typo3','Wordpress');
var free_ses = new Array('free1', 'free2', 'free3');
var link_ex = new Array('link1', 'link2', 'link3');
var partner = new Array('parter1', 'partner2', 'partner3');

var basic_host = new Array('Stater Plan', 'Business Plan','Corporate Basic','Corporate Gold','Corporate Platinum','Unlimited PHP','Unlimited .net','Unlimited Premimum');
var jsp_host = new Array('JSP Stater', 'JSP Silver', 'JSP Gold','JSP Platinum');
var oracle_host = new Array('ORA 50MB','ORA 150MB','ORA 300MB','ORA 1GB','ORA 1.5GB','ORA 2GB','ORA 4GB');

var htmlMain = "";
function getSubmain(mainVal)
{   
   if(mainVal == "Web Hosting")
   {
	   htmlMain = '<select name="selSub" id="selSub" onChange="getSupermain(this.value);">';
	   htmlMain += '<option value=""> Select </option>';
	   htmlMain += '<option value="basic">Basic Hosting</option>';
	   htmlMain += '<option value="jsp">JSP Hosting</option>';
	   htmlMain += '<option value="oracle">Oracle Hosting</option>';
	   htmlMain += '</select>';
   }
   else if(mainVal == "E-commerce development")
   {
	   htmlMain = '<select name="selSub" id="selSub">';
	   for(i = 0; i < ecom.length; i++)
	   {
		 htmlMain += '<option value="'+ecom[i]+'">'+ecom[i]+'</option>';   
	   }
	   htmlMain += '</select>';
	   document.getElementById("selSuper").innerHTML = "";
   }
   else if(mainVal == "Application software development")
   {
		htmlMain = "";
		document.getElementById("selSuper").innerHTML = "";
   }
   else if(mainVal == "SEM")
   {
	   htmlMain = '<select name="selSub" id="selSub">';
	   for(i = 0; i < sem.length; i++)
	   {
		 htmlMain += '<option value="'+sem[i]+'">'+sem[i]+'</option>';   
	   }
	   htmlMain += '</select>';
	   document.getElementById("selSuper").innerHTML = "";
   }
   else if(mainVal == "Domain Registration")
   {
		   htmlMain = '<select name="selSub" id="selSub">';
	   for(i = 0; i < flash_anim.length; i++)
	   {
		 htmlMain += '<option value="'+domain_reg[i]+'">'+domain_reg[i]+'</option>';   
	   }
	   htmlMain += '</select>';
	   document.getElementById("selSuper").innerHTML = "";
   }
   else if(mainVal == "3D_Flash Animation")
   {
		htmlMain = "";
		document.getElementById("selSuper").innerHTML = "";
   }
   else if(mainVal == "Website Development")
   {
	   htmlMain = '<select name="selSub" id="selSub">';
	   for(i = 0; i < web_devlop.length; i++)
	   {
		 htmlMain += '<option value="'+web_devlop[i]+'">'+web_devlop[i]+'</option>';   
	   }
	   htmlMain += '</select>';
	   document.getElementById("selSuper").innerHTML = "";
   }
   else if(mainVal == "Free Search Engine Submission")
   {
	   htmlMain = '<select name="selSub" id="selSub">';
	   for(i = 0; i < free_ses.length; i++)
	   {
		 htmlMain += '<option value="'+free_ses[i]+'">'+free_ses[i]+'</option>';   
	   }
	   htmlMain += '</select>';
	   document.getElementById("selSuper").innerHTML = "";
   }
   else if(mainVal == "Link Exchange")
   {
	   htmlMain = '<select name="selSub" id="selSub">';
	   for(i = 0; i < link_ex.length; i++)
	   {
		 htmlMain += '<option value="'+link_ex[i]+'">'+link_ex[i]+'</option>';   
	   }
	   htmlMain += '</select>';
	   document.getElementById("selSuper").innerHTML = "";
   }
   else if(mainVal == "Partnership Proposal")
   {
		htmlMain = "";
		document.getElementById("selSuper").innerHTML = "";
	   
   }else if(mainVal == "Other"){
		htmlMain = "";
		document.getElementById("selSuper").innerHTML = "";
   }
   
   if(htmlMain != "undefined")
   {
     document.getElementById("selSub").innerHTML = htmlMain;
   }
   if(mainVal == ""){
	 document.getElementById("selSub").innerHTML = "";
	 document.getElementById("selSuper").innerHTML = "";
   }
}

function getSupermain(subVal)
{	
	var htmlSub;
	if(subVal == "basic")
	{
		htmlSub = '<select name="selSuper" id="selSuper">';
		for(i = 0; i < basic_host.length; i++)
		{
			htmlSub += '<option value="'+basic_host[i]+'">'+basic_host[i]+'</option>';
		}
		htmlSub += '</select>';
	}
	else if(subVal == "jsp")
	{
		htmlSub = '<select name="selSuper" id="selSuper">';
		for(i = 0; i < jsp_host.length; i++)
		{
			htmlSub += '<option value="'+jsp_host[i]+'">'+jsp_host[i]+'</option>';
		}
		htmlSub += '</select>';
	}
	else if(subVal == "oracle")
	{
		htmlSub = '<select name="selSuper" id="selSuper">';
		for(i = 0; i < oracle_host.length; i++)
		{
			htmlSub += '<option value="'+oracle_host[i]+'">'+oracle_host[i]+'</option>';
		}
		htmlSub += '</select>';
	}
	
	if(htmlSub != "")
	{
	  document.getElementById("selSuper").innerHTML = htmlSub;
	}   
}
