var popup;
	function getDataIframe(phonename) {
		//var myHTML = '<iframe id="iframeinfo" src="http://www.google.com"></iframe>';
		//document.getElementById('phoneinfo').innerHTML = 'Coming soon...<BR><A href="javascript:hideinfo();">Close Window</A>';
		//document.getElementById('phoneinfo').innerHTML = myHTML;

		var url = linkPath + 'html-content/' + phonename + ".html"
		document.getElementById('iPhoneInfo').src=url;
	}

	function getData(phonename)
	{
		var req = null;
		var linkPath='http://'+ window.location.hostname +'/';
		var imagePath='http://'+ window.location.hostname +'/';
		//alert(linkpath);
		//var linkPath='http://www.onecompare.com/';
		//var imagePath='http://www.onecompare.com/';

		if (window.XMLHttpRequest)
		{
 			req = new XMLHttpRequest();
			if (req.overrideMimeType)
			{
				req.overrideMimeType('text/html');
			}
		}
		else if (window.ActiveXObject)
		{
			try {
				req = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e)
			{
				try {
					req = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e) {}
			}
        	}


		req.onreadystatechange = function()
		{
			document.getElementById('phoneinfo').innerHTML="<div class='loading'><img src='" + imagePath + "/loading.gif' alt='Loading...' /></div><div class='loadingtext'>Loading, please wait...</div>" + "<p class='center'><a href='javascript:hideinfo();'>Close this window</a></p>";
			if(req.readyState == 4)
			{
				if(req.status == 200)
				{
					document.getElementById('phoneinfo').innerHTML=req.responseText + "<p><a href='javascript:hideinfo();'>Close this window</a></p>";
				}
				else
				{
					alert('Error: returned status code ' + req.status + ' ' + req.statusText);
				}
			}
		};
		var url = linkPath + 'html-content/' + phonename + '.html';
		//alert(url);
		bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
		//alert( url + bustcacheparameter );
		req.open("GET", url + bustcacheparameter, true);
		req.send(null);
	}

function showinfo(phonename) {
    popup.style.top = Math.round((document.documentElement.clientHeight/2)-(popup.style.height/2)+document.documentElement.scrollTop)+'px';
    popup.style.left = Math.round((document.documentElement.clientWidth/2)-(popup.style.width/2))+"px";
	popup.style.visibility = 'visible';
	getData(phonename);
}

function hideinfo() {
	popup.style.visibility = 'hidden';
}

function getphoneinfo() {
    popup = document.getElementById('phoneinfo');
}