function _unrulyRefUrl() {
	if (top === self || typeof(document.referrer) == "undefined" || document.referrer.length < 1) { 
		return document.location.href;
	} else { 
		return document.referrer;
	}
}
	
        
    	unrulyGeoUrl = function() {
		
    		function getQsParams(){
                var qsParams = {length:0, keys:new Array()};
                var usestr = _unrulyRefUrl();
                if(usestr.split("?").length == 2) {
                    var paramInline = usestr.split("?")[1].split("&");
                    for(var i = 0; i < paramInline.length; i++){
                        qsParams.keys.push(paramInline[i].split("=")[0]);
                        qsParams[paramInline[i].split("=")[0]] = paramInline[i].split("=")[1];
                        qsParams.length++;
                    }
                } 
                return qsParams;
        	}
    		
    		function isBuggyChromium() {
    			if (navigator.userAgent == null) return false;
    			var userAgent = navigator.userAgent.toLowerCase();
    			var index = userAgent.indexOf('chrome');
    			if (index<0) return false;
    			if (userAgent.length > index+8) return (userAgent.substring(index+7, index+8) < 3);
    			return false;
    		}
    	
    		var href = _unrulyRefUrl();
    		if (href.indexOf("unrulyCountry") != -1) {
    			var params = getQsParams();
        		if (params["unrulyCountry"] != null) {
        			unrulyGeoCountryCode = params["unrulyCountry"].toLowerCase();
        		}
    		}
			
        	var countryLookup = [];
    		var numTerritories = 1;
        	        		countryLookup['au'] = '3730';
    		    		
    						var apid = "_default";
        		if (typeof unrulyGeoCountryCode != "undefined") {
        			if (unrulyGeoCountryCode.toLowerCase()=="xx") {
        				        				apid = "";
        			} else { 
        				                		apid = countryLookup[unrulyGeoCountryCode.toLowerCase()];
                    	if (typeof apid == "undefined") {
                    		apid = "_default";
                    	} else {
                    		apid = "_" + apid;
                    	}
        			}
        		}
			    		if ((numTerritories == 0 || apid == "_default") && 2 == 2) {
    			if (!isBuggyChromium()) {
        				document.writeln("This is a community-driven website, which means it depends on you to continue existing and to grow and thrive. If you like this site, please consider helping it. You can do that by contributing in multiple ways:");
document.writeln("<ul>");
document.writeln("<li><a href=\"/im/selectCard\" title=\"You can upload new sets for your favorite game\">Uploading the card lists</a> for new sets as they become available.</li>");
document.writeln("<li><a href=\"/im/feedback\" title=\"Let me know of any errors or missing cards in the site's database\">Letting me know</a> of any errors in our card lists or any missing cards so that our card database stays correct and updated.</li>");
document.writeln("<li>Reporting any inappropriate content by just clicking on the warning icon (<img src=\"/img/report_content.png\" width=\"20\" height=\"20\">) next to it.</li>");
document.writeln("<li>Posting news in our forums and helping others with their questions.</li>");
document.writeln("<li><a href=\"/im/feedback\">Sending your suggestions</a> for improvements, or your comments on what you like the most in this site.</li>");
document.writeln("</ul>");
document.writeln("<p>Thanks a lot for your help.");

    			}
    		} else {
        			var iframe = document.getElementById("unruly1283504639673");
    			iframe.style.display="block";
				var url = "http://video.unrulymedia.com/iframe_6685886%s.html?d=1283504639673" +
            		(typeof wildfireAddParams != "undefined" ? wildfireAddParams : '') +
                	'&refurl=' + encodeURIComponent(_unrulyRefUrl());
				document.getElementById("unruly1283504639673").src = url.replace("%s", apid);
			}
    	}
    	document.write('<iframe id="unruly1283504639673" style="display:none;" frameborder="0" scrolling="no" width="400" height="353"></iframe>');
    	document.write('<scr'+'ipt src="http://video.unrulymedia.com/country_code.js?version=5" type="text/javascr'+'ipt"></scr'+'ipt>');
    	
    

document.write('<script type="text/javascript">_qoptions={qacct:"p-e8Y0HwzVa2sIw"};</script><script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>');
