function EmptySearch()
{
	document.getElementById('q').value = "";
}

function InitSearch()
{
	document.getElementById('q').value = "Search this site.";
}

var request = 
{ 
	QueryString : function(val) 
	{ 
		var uri = window.location.search; 
		var re = new RegExp("" +val+ "=([^&?]*)", "ig"); 
		return ((uri.match(re))?(uri.match(re)[0].substr(val.length+1)):null); 
	} 
} 

function Init(n)
{
	var rt = request.QueryString("str");
	switch(rt)
	{
		case 'allproducts':
		SelectTag(3, 'four', 4);		
		break;
		
		default:
		SelectTag(0, 'one', n);
	}
}

function SelectTag(id, id1, n)
{
	for(i = 0; i < n; i++)
	{
		document.getElementById("quicktabs_tabpage_1_" + i).style.display = "none";
	}
	document.getElementById("tab-one").className = "one_normal";
	document.getElementById("tab-two").className = "two_normal";
	document.getElementById("tab-three").className = "three_normal";
	document.getElementById("tab-four").className = "four_normal";
	if(n == 5)
	{
		document.getElementById("tab-five").className = "five_normal";
	}
	
	document.getElementById("quicktabs_tabpage_1_" + id).style.display = "block";
	document.getElementById("tab-" + id1).className = id1 + "_active"; 
}

function ShowBenefits()
{
	var a = document.getElementById("benefits_show");
	var b = document.getElementById("benefits_short");
	var c = document.getElementById("benefits_all");
	var d = document.getElementById("br");
	
	var str = a.innerHTML;
	
	if(str.search(/\+/) != -1)
	{
		a.innerHTML = "[-] Close all";
		b.style.display = "none";
		c.style.display = "block";
		d.style.display = "none";
	}
	else
	{
		a.innerHTML = "[+] See all";
		b.style.display = "block";
		c.style.display = "none";
		d.style.display = "block";
	}
}

function CloseLanguage()
{
	document.getElementById("language").style.display = "none";
}

function ShowLanguage()
{
	document.getElementById("language").style.display = "block";
}

function GoSmartDefrag()
{
	window.location.href = "allproducts.html";
}

function GoGameBooster()
{
	window.location.href = "allproducts.html";
}

function GoPasswordGenerator()
{
	window.location.href = "allproducts.html";
}

function GoUninstaller()
{
	window.location.href = "allproducts.html";
}

function GoAscDownload()
{	
	window.location.href = "affiliate_solutions.html";
}

function SwichShowHid(rows,name,id) {
	for(var i=1;i<=rows;i++){
		blockBox = document.getElementById(name+i);
		if (id != i) {
			blockBox.style.display = 'none';
		} else {
			blockBox.style.display = '';
		}
	}
}
