
	function makeGrid() // makes header grid
	{
		domOut += ' ';
		domOut += '<div class="resultgrid">';
		domOut += '<div class="domitem">&nbsp;</div>';
		domOut += '<div class="dom1"> '+dom[1]+' </div><div class="dom2"> '+dom[2]+' </div>';
		domOut += '<div class="dom3"> '+dom[3]+' </div><div class="dom4"> '+dom[4]+' </div>';
		domOut += '<div class="dom5"> '+dom[5]+' </div><div class="dom6"> '+dom[6]+' </div>';
		domOut += '</div>';
		dumpToScr();
	}
	
	function makeSuggestGrid(item) // holds suggest terms and result count
	{
		domOut += '<div class="suggestgrid">';
		domOut += '<div class="domitem">' + item + ' &nbsp;</div>';
		domOut += '<div class="dom1"> &nbsp; </div><div class="dom2"> &nbsp; </div>';
		domOut += '<div class="dom3"> &nbsp; </div><div class="dom4"> &nbsp; </div>';
		domOut += '<div class="dom5"> &nbsp; </div><div class="dom6"> &nbsp; </div>';
		domOut += '</div>';
	}

	function makeResultGrid(domlabel, type) // makes grid for domain results
	{
		domOut += '<div class="resultwrap">';
		domOut += '<div class="domitem"> '+domlabel+' </div>';
		switch (type) { 
			case 'primary': makePrimaryHold(domlabel); break; 
			case 'global': makeGlobalHold(domlabel); break;
			}
		domOut += '</div>';
	}
	
	function makeGlobalHold(domlabel)
	{
		domOut += '<div id="'+domlabel+'_global" class="global"><img src="http://s3.amazonaws.com/DomainNameTool/images/spinner.gif"></div>';
	}
	
	function makePrimaryHold(domlabel)
	{
		domOut += '<div id="'+domlabel+'_p" class="primary"><img src="http://s3.amazonaws.com/DomainNameTool/images/spinner.gif"></div><div id="'+domlabel+'_s" class="secondary"><div id="update_'+domlabel+'"  class="secondLink" onClick="updateDomS(\''+domlabel+'\');">Check These Extensions</div></div>';
	}
	
	function makePrimary(domlabel,domresults) // for ajax update | domresults = array() result for each domExt
	{
		dom1 = domresults[0]==1 ? makeAvail(domlabel,dom[1]) : makeTaken(domlabel,dom[1]);
		dom2 = domresults[1]==1 ? makeAvail(domlabel,dom[2]) : makeTaken(domlabel,dom[2]);
		return '<div class="dom1">'+dom1+'</div><div class="dom2">'+dom2+'</div>';
	}
	
	function makeSecondary(domlabel,domresults) // for ajax update
	{
		domSOut = '';
		dom3 = domresults[0]==1 ? makeAvail(domlabel,dom[3]) : makeTaken(domlabel,dom[3]);
		dom4 = domresults[1]==1 ? makeAvail(domlabel,dom[4]) : makeTaken(domlabel,dom[4]);
		dom5 = domresults[2]==1 ? makeAvail(domlabel,dom[5]) : makeTaken(domlabel,dom[5]);
		dom6 = domresults[3]==1 ? makeAvail(domlabel,dom[6]) : makeTaken(domlabel,dom[6]);
		domSOut += '<div class="dom3">'+dom3+'</div><div class="dom4">'+dom4+'</div>';
		domSOut += '<div class="dom5">'+dom5+'</div><div class="dom6">'+dom6+'</div>';
		return domSOut;
	}
	
	function makeGlobal(domlabel,domresults) // for ajax update
	{
		dom1 = domresuls[0]==1 ? makeAvail(domlabel,dom[1]) : makeTaken(domlabel,dom[1]);
		dom2 = domresuls[1]==1 ? makeAvail(domlabel,dom[2]) : makeTaken(domlabel,dom[2]);
		dom3 = domresuls[2]==1 ? makeAvail(domlabel,dom[3]) : makeTaken(domlabel,dom[3]);
		dom4 = domresuls[3]==1 ? makeAvail(domlabel,dom[4]) : makeTaken(domlabel,dom[4]);
		dom5 = domresuls[4]==1 ? makeAvail(domlabel,dom[5]) : makeTaken(domlabel,dom[5]);
		dom6 = domresuls[5]==1 ? makeAvail(domlabel,dom[6]) : makeTaken(domlabel,dom[6]);
		domOut += '<div class="dom1">'+dom1+'</div><div class="dom2">'+dom2+'</div>';
		domOut += '<div class="dom3">'+dom3+'</div><div class="dom4">'+dom4+'</div>';
		domOut += '<div class="dom5">'+dom5+'</div><div class="dom6">'+dom6+'</div>';
	}
	
	function makeAvail(domain,ext)
	{
		cartlink = "buyItem('"+domain+ext+"');";
		buylink = 'http://www.kqzyfj.com/interactive?domainToCheck='+domain+'&tld='+ext+'&checkAvail=1&aid=10390987&pid=3213052&url=http%3A%2F%2Fwww.godaddy.com%2Fgdshop%2Fregistrar%2Fsearch.asp%3Fisc%3D0000000000';
		return '<div class="buy"><a href="'+buylink+'" target="_blank" title="Buy Now">&nbsp;&nbsp;&nbsp;</a></div><div id="cart_'+domain+ext+'" class="cart"><a href="#" onClick="buyItem(\''+domain+ext+'\'); showBasket(); showClick(\''+domain+ext+'\'); return false;" target="_blank" title="Add to Cart">&nbsp;&nbsp;&nbsp;</a></div>';
	}
	
	function makeTaken(domain,ext)
	{
		domurl = "http://www."+domain+ext; // make http://
		domwhois = "http://whois.sc/"+domain+ext;
		return '<div class="view"><a href="'+domurl+'" target="_blank" title="View Site">&nbsp;&nbsp;&nbsp;</a></div><div class="whois"><a href="'+domwhois+'" target="_blank" title="See Whois">&nbsp;&nbsp;&nbsp;</a></div>';
	}
