function setLogin(text) {
	if (text=='login') {
		document.getElementById('media').innerHTML = divContent;
		
	} else if (text=='upgrade') {
		document.getElementById('media').innerHTML = "<table><tr><td>Purchase</td></tr></table>";
		
	} else if (text=='download') {
		document.getElementById('media').innerHTML = "<table><tr><td>download</td></tr></table>";
	}
}

function startqvideo(vidfile) {
	if (vidfile=='FILE_NOT_FOUND') {
		alert('This Surah/Juz is not available yet. Please check back on this shortly.');
	} else {
		var so = new SWFObject("/qrnvid/player.swf", "vidplayer", "425", "344", "6","#EFEFEF", true);
		so.addParam("quality",		"best");
		so.addParam("allowfullscreen",	"true");
		so.addParam('wmode',		"transparent");
		so.addVariable("file",vidfile);
		so.addVariable('width',		"425");
		so.addVariable('height',	"344");
		so.addVariable("displaywidth",	"350");
		so.addVariable("displayheight",	"270");
		so.addVariable("backcolor",	"0x4e9e00");
		so.addVariable("frontcolor",	"0xAA0000");
		so.addVariable("lightcolor",	"0xFFFFFF");
		so.addVariable('autoscroll',	"yes");
		so.addVariable('overstretch',	"true");
		so.addVariable("autostart",	"true");
		so.addVariable("bufferlength",	"5");
		so.addVariable("repeat",	"list");
		so.addVariable("shuffle",	"false");
		so.addVariable("smoothing",	"true");
		so.write("vidplayer");
	}
}

function startuvideo(vidfile) {
	if (vidfile=='FILE_NOT_FOUND') {
		alert('This Surah/Juz is not available yet. Please check back on this shortly.');
	} else {
		document.getElementById('vidplayer').innerHTML = "<object width='425' height='344'><param name='movie' value='http://www.youtube.com/" + vidfile + "&fs=1&rel=0&color1=0x234900&color2=0x4e9e00&border=0&autoplay=1'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><param name='wmode' value='transparent'/><embed src='http://www.youtube.com/" + vidfile + "&fs=1&rel=0&color1=0x234900&color2=0x4e9e00&border=0&autoplay=1' type='application/x-shockwave-flash'  allowscriptaccess='never' wmode='transparent' allownetworking='internal' allowfullscreen='true' width='425' height='344'></embed></object>'";			
	}
}


 function startvideo(vid) {
    if (vid.indexOf('qrn')>-1) {
   		startqvideo(vid);	
    } else {
    	startuvideo(vid);
    }	 
 }



