// movie links based on what we detected
function openWin(url,x,y,width,height,id)
{
	winparams='toolbar=no,location=no,directories=no,menubar=no,status=no,';
	winparams+='scrollbars=no,resizable=no';
	if (navigator.appName.indexOf("Microsoft")>=0)
	{
		winparams+=',left=' + x + ',top=' + y + ',width=' + width + ',height=' + height;
	}
	else
	{
		winparams+=',screenX=' + x + ',screenY=' + y + ',width=' + width + ',height=' + height;
	}
	popup=window.open(url,"vodafonepopup"+id,winparams);
	popup.focus();
}

function showLink(link,w,h,text)
{
	document.write('<img src="'+webroot+'/images/a2.gif" width="3" height="6" vspace="0" hspace="3">');
	document.write('<a href="javascript:openWin(\''+webroot+link+'\',50,50,'+w+','+h+',2);">');
	document.write(text+'</a><br>\n');
}

function showLink2(link,size,text)
{
	/*
	document.write('<img src="'+webroot+'/images/a2.gif" width="3" height="6" vspace="0" hspace="3">');
	document.write('<a href="javascript:openWin(\''+webroot+link+'\',50,50,'+size+',2);">');
	document.write(text+'</a><br>\n');
	*/
	
	document.write('<li style="width:180px"><a href="javascript:openWin(\''+webroot+link+'\',50,50,'+size+',2);" class="iconRightContentMain">'+text+'</a></li>');
	
}

function showMovieLinks(year,sizes)
{
	if(!sizes) sizes = '200,180;360,280;200,180;360,280;200,180;360,280';
	var aSizes = sizes.split(';');

	if (detectWindowsMedia())
	{
		document.write('<table border="0" cellspacing="10" ><tr><td style="padding-right: 10px;">');
		document.write('<img src="'+webroot+'/images/icons/wm_p.jpg" width="49" height="49"}</img>');
		document.write('</td><td>');
		document.write('<ul class="ulLinkList" style="width:180px; margin: 0; padding: 0;">');
		showLink2('/movies/'+year+'_isdn.wmv.html',aSizes[0],'Windows Media Player ISDN');
		showLink2('/movies/'+year+'_dsl.wmv.html',aSizes[1],'Windows Media Player DSL');
		document.write('</ul>');
		document.write('</td></tr></table>');
	}
	if (detectReal())
	{
		document.write('<table border="0" cellspacing="10" ><tr><td style="padding-right: 10px;">');
		document.write('<img src="'+webroot+'/images/icons/real_p.jpg" width="49" height="49"}</img>');
		document.write('</td><td>');
		document.write('<ul class="ulLinkList" style="width:180px; margin: 0; padding: 0;">');
		showLink2('/movies/'+year+'_isdn.rm.html',aSizes[2],'Real Player ISDN');
		showLink2('/movies/'+year+'_dsl.rm.html',aSizes[3],'Real Player DSL');
		document.write('</ul>');
		document.write('</td></tr></table>');
	}
	if (detectQuickTime())
	{
		document.write('<table border="0" cellspacing="10" ><tr><td style="padding-right: 10px;">');
		document.write('<img src="'+webroot+'/images/icons/quicktime_p.jpg" width="49" height="49"}</img>');
		document.write('</td><td>');
		document.write('<ul class="ulLinkList" style="width:180px; margin: 0; padding: 0;">');
		showLink2('/movies/'+year+'_isdn.mov.html',aSizes[4],'Quicktime ISDN');
		showLink2('/movies/'+year+'_dsl.mov.html',aSizes[5],'Quicktime DSL');
		document.write('</ul>');
		document.write('</td></tr></table>');
	}
}
