// JavaScript Document
		//**************************
		// Detects if the current device is an Android OS-based device.
function DetectAndroid() {
	var deviceAndroid = "android";
	var uagent = navigator.userAgent.toLowerCase();
				
	if (uagent.search(deviceAndroid) > -1) 
		return true;
	else
		return false;
}

//------------------------------------------------------------------
window.onload = function() {
	//  armored strike
	if (document.getElementById("demo_armoredstrike") !== null) { 
		if(DetectAndroid()) {
			document.getElementById("demo_armoredstrike").href="http://market.android.com/search?q=pname:com.requiem.armoredStrikeLite";
			document.getElementById("full_armoredstrike").href="http://market.android.com/search?q=pname:com.requiem.armoredStrike";
		}  else {
		document.getElementById("demo_armoredstrike").onclick = function() { alert("Please click on this link using your Android device."); }
		document.getElementById("full_armoredstrike").onclick = function() { alert("Please click on this link using your Android device."); }
		}
	} // end armored strike
	
	//  beatdown boxing
	if (document.getElementById("demo_beatdownboxing") !== null) { 
		if(DetectAndroid()) {
			document.getElementById("demo_beatdownboxing").href="http://market.android.com/search?q=pname:com.requiem.boxingLite";
			document.getElementById("full_beatdownboxing").href="http://market.android.com/search?q=pname:com.requiem.boxing";
		} else {
		document.getElementById("demo_beatdownboxing").onclick = function() { alert("Please click on this link using your Android device."); }
		document.getElementById("full_beatdownboxing").onclick = function() { alert("Please click on this link using your Android device."); }
		}
	} // end beatdown boxing
	
	//  fastfood mayhem
	if (document.getElementById("demo_fastfoodmayhem") !== null) { 
		if(DetectAndroid()) {
			document.getElementById("demo_fastfoodmayhem").href="http://market.android.com/search?q=pname:com.requiem.fastFoodMayhemLite";
			document.getElementById("full_fastfoodmayhem").href="http://market.android.com/search?q=pname:com.requiem.fastFoodMayhem";
		} else {
		document.getElementById("demo_fastfoodmayhem").onclick = function() { alert("Please click on this link using your Android device."); }
		document.getElementById("full_fastfoodmayhem").onclick = function() { alert("Please click on this link using your Android device."); }
		
		}
	} // end fastfood mayhem
	
	//  gembusters
	if (document.getElementById("demo_gembuster") !== null) { 
		if(DetectAndroid()) {
			document.getElementById("demo_gembuster").href="http://market.android.com/search?q=pname:com.requiem.gembusterLite";
			document.getElementById("full_gembuster").href="http://market.android.com/search?q=pname:com.requiem.gembuster";
		}  else {
		document.getElementById("demo_gembuster").onclick = function() { alert("Please click on this link using your Android device."); }
		document.getElementById("full_gembuster").onclick = function() { alert("Please click on this link using your Android device."); }
		
		}
	} // end gembusters
	
	//  slimeball speedway
	if (document.getElementById("demo_slimeballspeedway") !== null) { 
		if(DetectAndroid()) {
			document.getElementById("demo_slimeballspeedway").href="http://market.android.com/search?q=pname:com.requiem.slimeballLite";
			document.getElementById("full_slimeballspeedway").href="http://market.android.com/search?q=pname:com.requiem.slimeball";
		}  else {
		document.getElementById("demo_slimeballspeedway").onclick = function() { alert("Please click on this link using your Android device."); }
		document.getElementById("full_slimeballspeedway").onclick = function() { alert("Please click on this link using your Android device."); }
		
		}	
	} // end slimeball speedway
	
	
} // end onload
