function flipVisible(idname, visible)
{	
	obj = document.getElementById(idname);
	obj.style.display = visible;
}

function buttonSwitch(id, id_not)
{			
	document.getElementById("desc" + id).style.display="block";			
	document.getElementById("desc" + id_not).style.display="none";	
}

function CollapseAll(maxID)
{
	document.getElementById("alls_action").innerHTML = "<span style=\"font-size:12px;color:#4A7EB7;cursor:pointer;font-weight:bold;\" onclick=\'JavaScript:ExpandAll(" + maxID + ");\'>Expand All</span>";
		
	var id=1;
	for (id=1; id <= maxID; id++) 
	{
		HideDetails(id);
	}
}

function ExpandAll(maxID)
{
	document.getElementById("alls_action").innerHTML = "<span style=\"font-size:12px;color:#EA9617;cursor:pointer;font-weight:bold;\" onclick=\'JavaScript:CollapseAll(" + maxID + ");\'>Collapse All</span>";
		
	var id=1;
	for (id=1; id <= maxID; id++) 
	{
		ShowDetails(id);
	}
}


function ShowDetails(id)
{
	document.getElementById("row_" + id).className = "row tbl_txt show";
	document.getElementById("ttl_" + id).className = "show";
	document.getElementById("ctgr_" + id).className = "pr_ctgr show";
	document.getElementById("prc_" + id).className = "pr_prc show";
	document.getElementById("lcns_" + id).className = "pr_lcns show";
	document.getElementById("show_" + id).className = "pr_flsz show";
	document.getElementById("show_" + id).innerHTML = "<span style=\"font-size:11px;color:#EA9617;cursor:pointer;\" onclick=\'JavaScript:HideDetails(" + id + ");\'>Hide Details</span>";


	document.getElementById(id).style.display = "block";
}

function HideDetails(id)
{
	document.getElementById("row_" + id).className = "row tbl_txt";
	document.getElementById("ttl_" + id).className = "";
	document.getElementById("ctgr_" + id).className = "pr_ctgr";
	document.getElementById("prc_" + id).className = "pr_prc";
	document.getElementById("lcns_" + id).className = "pr_lcns";
	document.getElementById("show_" + id).className = "pr_flsz";
	document.getElementById("show_" + id).innerHTML = "<span style=\"font-size:11px;color:#4A7EB7;cursor:pointer;\" onclick=\'JavaScript:ShowDetails(" + id + ");\'>Show Detail</span>";

	document.getElementById(id).style.display = "none";
}

function searchForm(searchKey)
{
	/***** Copyright VietBao.vn 2007*****/	
	default_search_text='Search';ref = document.referrer; 
	if (ref.indexOf('?') != -1 )
	{
		mysite = 'http://software.informer.com';
		mysitelength = mysite.length - 1;
		do_exit = ( (1==0) && (mysite.indexOf(ref.substr(0, mysitelength)) != -1) );
		if (!do_exit) 
		{
			cLocation = document.location + "|";
			if ( (mysite.indexOf(ref.substr(0, mysitelength)) == -1) && ( cLocation.indexOf('com_googlesearch') == -1 ) ) 
			{	
				qs = ref.substr(ref.indexOf('?')+1);
				qsa = qs.split('&');
				for (i=0;i<qsa.length;i++) 
				{
					qsip = qsa[i].split('=');
					if (qsip.length == 1) continue;
					if (qsip[0] == 'q' || qsip[0] == 'p' || qsip[0] == 'query' || qsip[0] == 'searchword'|| qsip[0] == 'search'|| qsip[0] == 'qt') 
					{
						words = decodeURIComponent(qsip[1].replace(/\+/g,' '));
					}
				}
			}
		}	 	
	}			
	
	if (words) 
	{		
		set_cookie("siskqt",words,2010,12,31,"/",'informer.com');		
	} 
	else if(searchKey)	
	{ 		
		words = searchKey;
	}
	else if (!get_cookie ("siskqt"))		
	{	
		words =default_search_text;
	} else 
	{
		var words = get_cookie ("siskqt");
	}
	
	var search = '<form accept-charset="utf-8" method="get" action="/search/" id="search_form" onsubmit="this.go.disabled=true; this.go.className=\'go2\';"><input type="text" name="search" class="txt" value="' + words + '" size="18" /><input type="submit" id="go" value="" name="go"/></form>';

//<form id="form1" name="form1" method="post" action="/search.wareseeker.com/search.php"><ul class="ul_s"><li class="li_s"><label><input name="allw" type="text"   value="' + words + '" onfocus="if(this.value==\'' + default_search_text + '\') this.value=\'\';" onblur="if(this.value==\'\') this.value=\'' + default_search_text + '\';"; size="40" /></label></li><li class="li_s1"><select name="softwareType"><option value="windows">Windows</option><option value="mac">Mac</option><option value="linux">Linux</option><option value="driver">Driver</option><option value="script">Script</option><option value="pda">Pda</option></select></li><li class="li_s2 style1"><label><input type="submit" value="Go" class="sl_submit" name="sl_submit" /></label></li><li class="li_s3"><a href="http://search.wareseeker.com/">Advanced Search </a></li></ul></form>';
	document.write(search);
}
