//function to trigger loading of compatible phone into iframe
function loadiframe(ct) 
	{
		if (ct == '') 
		{
			alert('You must pick a download type.');
		}
		else 
		{
			document.getElementById('myframe').style.visibility = 'visible';
			document.form1.submit();
		}
	}

//function to change tab styles on feature box tabs
function switchTabs(whichtab)
	{
		/*grey out all tabs*/
		var linkList = document.getElementById("tab-buttons").getElementsByTagName("a");
		for (i = 0; i < linkList.length; i++) {
		linkList[i].className = "";
		}
		/*set the tab we clicked to be white and underlined*/
		whichtab.className = "on";
	}
		
// Function to get buy details
function buyItem(targeturl)
	{
        
	//alert('ContentID: ' + contentID + ' / MobileNo: ' + mobileNo);
				
	var xmlHttp;
	
	try
	{    
	// Firefox, Opera 8.0+, Safari    
	xmlHttp=new XMLHttpRequest();    
	}
	catch (e)
	{    
	// Internet Explorer    
	try
		{      
		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
		}
	catch (e)
		{      
		try
			{        
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        
			}
		catch (e)
			{        
			alert("Your browser is not supported by this application!");        
			return false;        
			}      
		}    
	}
		
	
	xmlHttp.onreadystatechange=function()
      {
	  if(xmlHttp.readyState!=4)
        {
        document.getElementById("feature-box").innerHTML='<div style="margin:auto; padding-top:70px; width:480px; text-align:center;"><img src="grfx/ajax-loader.gif" width="100" height="100"></div>';
        }
      if(xmlHttp.readyState==4)
        {
        document.getElementById("feature-box").innerHTML=xmlHttp.responseText;
        }
      }
    xmlHttp.open("GET",targeturl + "&GUINum=" + Math.floor(Math.random()*99999999999999999),true);
    xmlHttp.send(null);  
	
	xmlHttp.flush;
	xmlHttp.close;
	}