function windowPop(url, name, width, height, scrollboolean) {
	var params;
	if (scrollboolean != "") {
		params = "scrollbars="+scrollboolean;
	} else {
		params = "scrollbars=0";
	}
	params= params + ",location=0,menubar=0,status=0,toolbar=0,resizable=0,top=40,left=40,";
	params = params + "width=" + width + ",height=" + height; 
	window.open(url, name, params).focus();
}

function windowPopSweepsHelp(url, name, width, height, scrollboolean) {
	var params;
	if (scrollboolean != "") {
		params = "scrollbars="+scrollboolean;
	} else {
		params = "scrollbars=0";
	}
	params= params + ",location=0,menubar=0,status=0,toolbar=0,resizable=0,top=300,left=300,";
	params = params + "width=" + width + ",height=" + height; 
	window.open(url, name, params).focus();
}

function windowPopSweepsMySlurp(url, name, width, height, scrollboolean) {
	var params;
	if (scrollboolean != "") {
		params = "scrollbars="+scrollboolean;
	} else {
		params = "scrollbars=0";
	}
	params= params + ",location=0,menubar=0,status=0,toolbar=0,resizable=0,top=300,left=300,";
	params = params + "width=" + width + ",height=" + height; 
	window.open(url, name, params).focus();
}

/*==========================================================================# 
# * Function for adding a Filter to an Input Field                          # 
# * @param  : [filterType  ] Type of filter 0=>Alpha, 1=>Num, 2=>AlphaNum   # 
# * @param  : [evt         ] The Event Object                               # 
# * @param  : [allowDecimal] To allow Decimal Point set this to true        # 
# * @param  : [allowCustom ] Custom Characters that are to be allowed       # 
#==========================================================================*/ 
function filterInput(filterType, evt, allowDecimal, allowCustom){ 
	var keyCode, Char, inputField, filter = ''; 
	var alpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; 
	var num   = '0123456789'; 
	// Get the Key Code of the Key pressed if possible else - allow 
	if(window.event){ 
		keyCode = window.event.keyCode; 
		evt = window.event; 
	}else if (evt)keyCode = evt.which; 
	else return true; 
	// Setup the allowed Character Set 
	if(filterType == 0) filter = alpha; 
	else if(filterType == 1) filter = num; 
	else if(filterType == 2) filter = alpha + num; 
	if(allowCustom)filter += allowCustom; 
	if(filter == '')return true; 
	// Get the Element that triggered the Event 
	inputField = evt.srcElement ? evt.srcElement : evt.target || evt.currentTarget; 
	// If the Key Pressed is a CTRL key like Esc, Enter etc - allow 
	if((keyCode==null) || (keyCode==0) || (keyCode==8) || (keyCode==9) || (keyCode==13) || (keyCode==27) )return true; 
	// Get the Pressed Character 
	Char = String.fromCharCode(keyCode); 
	// If the Character is a number - allow 
	if((filter.indexOf(Char) > -1)) return true; 
	
	// Else if Decimal Point is allowed and the Character is '.' - allow 
	else if(filterType == 1 && allowDecimal && (Char == '.') && inputField.value.indexOf('.') == -1)return true; 
	else return false; 
}

function tagDownload(obj, type){
	var s_click = s_gi(s_account);
	s_click.events='event14';
	s_click.linkTrackVars = 'events,eVar9';
	s_click.linkTrackEvents = 'event14';
	s_click.eVar9 = type;
	s_click.tl(this, 'd', type);
}

function fireAtlasTag(tag){
	var trackingImage = document.getElementById('ClickTrackingImage');
    trackingImage.src = 'http://view.atdmt.com/action/' + tag;
}

function tagBuddyIcon(){
	fireAtlasTag('denrwe_BuddyIconDownload_9');
}

function tagWallpaper(){
	fireAtlasTag('denrwe_WallpaperDownload09_9');
}

function tagVideo(){
	fireAtlasTag('denrwe_VideoPlay09_10');
}

function tagPhoto(){
	fireAtlasTag('denrwe_PhotoView09_10');
}

function tagInstantWinGame(){
	fireAtlasTag('denrwe_InstantWinGameplay09_10');
}