function Search(){
	if (document.frmSearch.Cat.value == '') {
		alert('Please select a category!');
	}
	else if (document.frmSearch.Key.value == '') {
		alert('Please enter a keyword!');
		document.frmSearch.Key.focus();
	}
	else {
		keyword = document.frmSearch.Key.value;
		window.location = document.frmSearch.Cat.value + '.html?k=' + keyword;
	}
}

function CheckKey() {
	if (window.event.keyCode == 13) {
		Search();
	}
	return false;
}
var BookmarkURL = window.location.href;
var BookmarkTitle = "computeractive ! Ringtones and logos for your cellphones !";

function Bookmark() {
	if (document.all) window.external.AddFavorite(BookmarkURL,BookmarkTitle)
}

function jsOpenhWnd (u) {
	p = "height=660,width=380,toolbar=no,directories=no,status=no,scrollbars=auto,resizable=no,menubar=no";
	hWnd = window.open (u, "Hwnd", p);
	hWnd.focus();
}

function checkVHost(str){
	
	if(str.indexOf(".")!=-1){
		return true;
	}else{
		return false;
	}
	
}

function subscription() {
	window.open('http://account.mediaplazza.com/abo/abo_signup_1.php?slang=EN&c=US&svhost=computeractive','vimpass','width=425,height=400,toolbar=no,directories=no,status=yes,scrollbars=yes,resizable=yes,menubar=no');
}
	if(checkVHost('computeractive')){
		alert('MEDIAPLAZZA WARNING\r\n\r\nYour vHost is not defined correctly.\r\nEnter your correct Subdomain in the config file.')
	};
	
/* Client-side access to querystring name=value pairs
	Version 1.2.3
	22 Jun 2005
	Adam Vandenberg
*/
function Querystring(qs) { // optionally pass a querystring to parse
	this.params = new Object()
	this.get=Querystring_get
	
	if (qs == null)
		qs=location.search.substring(1,location.search.length)

	if (qs.length == 0) return

// Turn <plus> back to <space>
// See: http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1
	qs = qs.replace(/\+/g, ' ')
	var args = qs.split('&') // parse out name/value pairs separated via &
	
// split out each name=value pair
	for (var i=0;i<args.length;i++) {
		var value;
		var pair = args[i].split('=')
		var name = unescape(pair[0])

		if (pair.length == 2)
			value = unescape(pair[1])
		else
			value = name
		
		this.params[name] = value
	}
}

function Querystring_get(key, default_) {
	// This silly looking line changes UNDEFINED to NULL
	if (default_ == null) default_ = null;
	
	var value=this.params[key]
	if (value==null) value=default_;
	
	return value
}