
		function hideff()
		{								
			$('ff_header_01').hide();
			$('ff_header_02').show();
			$('ff_yourname').hide();
			$('ff_friendname').show();
			$('ff_youremail').hide();
			$('ff_friendemail').show();
			$('ff_download').hide();
			$('ff_go').show();
		}	

		
		function seton(img)
			{ img.src = img.src.replace(/\.gif/, "_over.gif"); }
		
		function setoff(img)
			{ img.src = img.src.replace(/\_over.gif/, ".gif"); }
			
		function showscreensaver(pic)
		{
			ind = pic.lastIndexOf("/");
			if (ind>0)
			{ cID = pic.substring(ind+1);}
			
			
			
			var url = '/trophy/inc/getdownload.asp';
			var pars = 'cType=ss&cID=' + cID;
			top.location.href = url + '?' + pars;
			

		}
		
		function showPDF(pic)
		{
			ind = pic.lastIndexOf("/");
			if (ind>0)
			{ cID = pic.substring(ind+1);}
			
			
			
			var url = '/trophy/inc/getdownload.asp';
			var pars = 'cType=pdf&cID=' + cID;
			top.location.href = url + '?' + pars;
			

		}
		
		function showwallpaper(pic, step)
		{

			hide_drops();
		
			$('dlsrc').value = pic;
			$('dltype').value = "wp";
			$('dlstep').value = step;

			var url = "/trophy/inc/popup_content.asp";

			var pars = "dlsrc=" + pic + "&dlstep=" + step + "&dltype=wp";

				var myAjax = new Ajax.Request(
					url, 
					{
						method: 'post', 
						parameters: pars, 
/*						onLoading: $('loader').show(),*/
						onComplete: function(transport)
							{
							var html = transport.responseText;
							popup_update('popup', html);							
							},
						onFailure: function(){ alert('Something went wrong...') }
	
					});




/*
			if(pic.match('zandg'))
				{
				$('cellRadio').hide();
				$('cellText').hide();
				} else {
				$('cellRadio').show();
				$('cellText').show();
				}
*/
		}
		
		function showpic(pic)
		{			

			$('pcID').value = pic;
			$('pcType').value = "eventpic";

			html = "<img src='"+ pic +"' border='0' height=\"280\">";
			$('pics').update(html);
			$('pics').show();
			
			$('mask').show();
			$('popup_pics').show();
		}
		
		function showvids(vidType, vidID)
		{
		
			if(vidType == "youtube"){
				html = "<object width=\"425\" height=\"344\">";
				html += "<param name=\"movie\" value=\"http://www.youtube.com/v/"+vidID+"&hl=en&fs=1\"></param>";
				html += "<param name=\"allowFullScreen\" value=\"true\"></param>";
				html += "<embed src=\"http://www.youtube.com/v/"+vidID+"&hl=en&fs=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"425\" height=\"344\"></embed>";
				html += "</object>";
				$('youtubetext').show();
			}
			
			if(vidType == "teaser"){

				html = "";
				//html += "<s cript language=\"javascript\">";
				//html += "if (AC_FL_RunContent == 0) {";
				//html += "alert(\"This page requires AC_RunActiveContent.js.\");";
				//html += "} else {";
				//html += "AC_FL_RunContent('codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0','width', '320','height', '240','src', 'flash_source/fest_movie','quality', 'high','pluginspage', 'http://www.macromedia.com/go/getflashplayer','align', 'middle','play', 'true','loop', 'true','scale', 'showall','wmode', 'window','devicefont', 'false','id', 'fest_movie','bgcolor', '#ffffff','name', 'fest_movie','menu', 'true','allowFullScreen', 'false','allowScriptAccess','sameDomain','movie', 'flash_source/fest_movie','salign', ''); //end AC code";
				//html += "}";
				//html += "< /script>";
				html += "<div style='z-index:20'>";
				html += "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0\" width=\"320\" height=\"240\" id=\"fest_movie\" align=\"middle\">";
				html += "<param name=\"allowScriptAccess\" value=\"sameDomain\" />";
				html += "<param name=\"allowFullScreen\" value=\"false\" />";
				html += "<param name=\"movie\" value=\"flash_source/"+vidID+".swf\" />";
				html += "<param name=\"quality\" value=\"high\" />";
				html += "<param name=\"bgcolor\" value=\"#ffffff\" />";
				html += "<param name=\"wmode\" value=\"transparent\" />";
				html += "<embed src=\"flash_source/"+vidID+".swf\" wmode=\"transparent\" quality=\"high\" bgcolor=\"#000000\" width=\"320\" height=\"240\" name=\"fest_movie\" align=\"middle\" allowScriptAccess=\"sameDomain\" allowFullScreen=\"false\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";
				html += "</object>";
				html += "</div>";

			}
			
			if(vidType == "flv"){
				html = "";
				html += "<div style='z-index:20'>";
				html += "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0\" width=\"320\" height=\"240\" id=\"fest_movie\" align=\"middle\">";
				html += "<param name=\"allowScriptAccess\" value=\"sameDomain\" />";
				html += "<param name=\"allowFullScreen\" value=\"false\" />";
				html += "<param name=\"movie\" value=\"../trophy/flash_source/player.swf?f="+vidID+"\" />";
				html += "<param name=\"quality\" value=\"high\" />";
				html += "<param name=\"bgcolor\" value=\"#ffffff\" />";
				html += "<param name=\"wmode\" value=\"transparent\" />";
				html += "<embed src=\"/common/includes/player.swf?f="+vidID+"\" wmode=\"transparent\" quality=\"high\" bgcolor=\"#000000\" width=\"320\" height=\"240\" name=\"fest_movie\" align=\"middle\" allowScriptAccess=\"sameDomain\" allowFullScreen=\"false\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";
				html += "</object>";
				html += "</div>";

			if (vidID.indexOf('summahhh') > -1)
			{
				$('vcID').value = vidID+".mp4";
			}
			else
			{
				$('vcID').value = vidID+".wmv";
			}
	
				$('vcType').value = "vids";
			}
			
			if(vidType == "mpg"){
			
			
			html = "<object id=\"MediaPlayer1\" width=\"265\" height=\"194\" classid=\"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" ";
			html += " codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902\" ";
			html += " standby=\"Loading Microsoft Windows Media Player components...\" type=\"application/x-oleobject\"> ";
			html += " <param name=\"FileName\" value=\""+vidID+".wmv\"> ";
			html += "<param name=\"animationatStart\" value=\"false\">";
			html += "<param name=\"transparentatStart\" value=\"true\">";
			html += "<param name=\"autoStart\" value=\"true\">";
			html += "<param name=\"showControls\" value=\"true\">";
			html += "<embed type=\"application/x-mplayer2\" pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\" Name=\"MediaPlayer\" src=\""+vidID+".wmv\" AutoStart=\"true\" ShowStatusBar=\"0\" volume=\"-1\" HEIGHT=\"194\"  WIDTH=\"265\"></embed></object>";
			
			/**/
			html = "<embed src=\""+vidID+".wmv\" width=\"265\" height=\"194\" autostart=\"false\" type=\"movie/mpg\"></ embed >";
			
			}
			
//			$('vcID').value = vidID;
//			$('vcType').value = vidType;
//			$('popup_content').update(html);
//			$('vids').show();


			popup_update('popup', html);
		}
		
		
		function send2friend(prepend)
			{
				if(prepend == "v"){
					var tName = $F('vtName');
					var tEmail = $F('vtEmail');
					var fName = $F('vfName');
					var fEmail = $F('vfEmail');
					var cType = $F('vcType');
					var cID = $F('vcID');
				}else if(prepend == "w"){
					var tName = $F('wtName');
					var tEmail = $F('wtEmail');
					var fName = $F('wfName');
					var fEmail = $F('wfEmail');
					var cType = $F('wcType');
					var cID = $F('wcID');
				}else if(prepend == "r"){
					var tName = $F('rtName');
					var tEmail = $F('rtEmail');
					var fName = $F('rfName');
					var fEmail = $F('rfEmail');
					var cType = $F('rcType');
					var cID = $F('rcID');
				}else if(prepend == "s"){
					var tName = $F('stName');
					var tEmail = $F('stEmail');
					var fName = $F('sfName');
					var fEmail = $F('sfEmail');
					var cType = $F('scType');
					var cID = $F('scID');
				}else if(prepend == "ra"){
					var tName = $F('ratName');
					var tEmail = $F('ratEmail');
					var fName = $F('rafName');
					var fEmail = $F('rafEmail');
					var cType = $F('raType');
					var cID = $F('raID');
				}else if(prepend == "p"){
					var tName = $F('ptName');
					var tEmail = $F('ptEmail');
					var fName = $F('pfName');
					var fEmail = $F('pfEmail');
					var cType = $F('pcType');
					var cID = $F('pcID');
				}
							
				var url = '/trophy/inc/send2friend.asp';
				var pars = 'cType=' + cType + '&cID=' + cID + '&tName=' + tName + '&tEmail=' + tEmail + '&fName=' + fName + '&fEmail=' + fEmail;
				
				//top.location.href = url + '?' + pars;
				
				var myAjax = new Ajax.Request(
					url, 
					{
						method: 'post', 
						parameters: pars, 
/*						onLoading: $('loader').show(),*/
						onComplete: function(transport)
							{
							var response = transport.responseText;
/*							$('loader').hide();*/
							try {alerterr(response);}
							catch(err){top.alerterr(response);}
							},
						onFailure: function()
						{ 
							try {alerterr('Something went wrong...');}
							catch(err){top.alerterr('Something went wrong...'); }
						}		// the TOP.alerterr is there in case the alerterr function is defined in the parent page and not in the iframe page. 
	
					});
				}
		
		function complete_send2friend()
		{
			alerterr('Thank you, your message has been sent.');
		}
		
		
		function download(prepend)
		{
			switch(prepend)
				{
					case "v": 
						var cType = $F('vcType');
						var cID = $F('vcID');
						break;
					case "w":
						var cType = $('dltype').value;
						var cID = $('dlsrc').value;
						if($('wcSize1').checked)
							{ var cSize = "1024";	}
						else
							{ var cSize = "1280";	}
						break;
					case "r":
						var cType = $F('rcType');
						var cID = $F('rcID');
						break;
					case "s":
						var cType = $F('scType');
						var cID = $F('scID');
						break;
					case "p":
						var cType = $F('pcType');
						var cID = $F('pcID');
						break;
					case "ra":
						var cType = $F('raType');
						var cID = $F('raID');
						break;
					case "pr":
						var cType = "pr";
						var cID = $F('raID');
						break;
				}
				

			if (cID.indexOf('summahhh'))
			{
				ind = cID;
			}
			else
			{
				ind = cID.lastIndexOf("/");
				if (ind>0)
				{ cID = cID.substring(ind+1);}

			}

			
			
			
			var url = '/trophy/inc/getdownload.asp';
			var pars = 'cType=' + cType + '&cID=' + cID + '&cSize=' + cSize;
			top.location.href = url + '?' + pars;
			//alert(this.href);
			
		}
		
		function download_cell(prepend){
		
			switch(prepend)
				{
					case "v":
						var cType = $F('vcType');
						var cID = $F('vcID');
						var tCell = $F('vtCell');
						break;
					case "w":
						var cType = $('dltype').value;
						var cID = $('dlsrc').value;
						var tCell = $('wpCell').value;
						break;
					case "rprim":
						var cType = $F('rcType');
						var cID = $F('rcID');
						var tName = $F('rfName');
						var tCell = $F('rfCell');
						break;
					case "rref":
						var cType = $F('rcType');
						var cID = $F('rcID');
						var tName = $F('rtName');
						var tCell = $F('rtCell');
						var fName = $F('rfName');
						var fCell = $F('rfCell');
						break;
					case "smsprim":
						var cType = $F('smscType');
						var cID = $F('smscID');
						var tName = $F('smsfName');
						var tCell = $F('smsfCell');
						break;
					case "smsref":
						var cType = $F('smscType');
						var cID = $F('smscID');
						var tName = $F('smstName');
						var tCell = $F('smstCell');
						var fName = $F('smsfName');
						var fCell = $F('smsfCell');
						break;
				}
				
				
				
			ind = cID.lastIndexOf("/");
			if (ind>0)
			{ cID = cID.substring(ind+1);}
			
			var url = '/trophy/inc/download_sms.asp';
			var pars = 'cType=' + cType + '&cID=' + cID + '&tName=' + tName + '&tCell=' + tCell + '&fName=' + fName + '&fCell=' + fCell;
			
			//location.href = url + '?' + pars;
				var myAjax = new Ajax.Request(
					url, 
					{
						method: 'post', 
						parameters: pars, 
						onLoading: alerterr('<div align="center"><img src="/trophy/images/circle_load_trans.gif" height="48" width="48"></div>'),
						onComplete: function(transport)
							{
							var response = transport.responseText;
//							$('loader').hide();
							alerterr(response);
							},
						onFailure: function(){ alerterr('Something went wrong...') }
	
					});
			
		}
	

	function completeReg(response)
	{
		alerterr(response.responseText);
		$('popup_register').hide();
		$('mask').hide();
	}
	
	
	function hide_drops()
	{
		
		var f = $$('select');
		var s = '';
		for(var i=0; i<f.length; i++){
			f[i].style.display='';
		}
		
	}	
	
	function show_drops()
	{
		
		var f = $$('select');
		var s = '';
		for(var i=0; i<f.length; i++){
			f[i].style.display='inline';
		}
		
	}
	
	function navon(img)
		{ 
		if(img.longdesc != "on")
			{img.src = img.src.replace(/\.gif/, "_over.gif");}
		}
	
	function navoff(img)
		{ 
		if(img.longdesc != "on")
			{img.src = img.src.replace(/\_over.gif/, ".gif"); }
		}
	

	function popup_close(popup_name)
	{
		$('scrollbar').show();
		$('slider').show();
		$('mask').style.visibility='hidden';;
		$(popup_name).hide();		
	}

	function popup_update(popup_name, html)
	{
		
			$('scrollbar').hide();
			
			$('mask').style.visibility='visible';;
			$(popup_name).show();
			$('popup_content').update(html);
			$('slider').hide();
		
	}


	function nextStep()
	{

		var dltype = $('dltype').value;
		var dlsrc = $('dlsrc').value;
		var dlstep = $('dlstep').value;
		
		var dltargetPC = $('dltargetPC') ? $('dltargetPC').checked : false;
		var dltargetCell = $('dltargetCell') ? $('dltargetCell').checked : false;



		dlstep = parseInt(dlstep);
		dlstep++;

	if (dltype == "wp")
		{
			if(dltargetPC)
			{
				showwallpaper(dlsrc, 2);
			} 
			else if (dltargetCell)
			{
				showwallpaper(dlsrc, 3);
			}
			else if (dlstep ==3)
			{
				download("w");
			}
			else if (dlstep ==4)
			{
				download_cell("w");
			}
		
		
		
		}
		
		
		
	}


/*  ------------------- */


		function send2friend_oneway(prepend)
			{
				if(prepend == "v"){
					var tName = $F('vtName');
					var tEmail = $F('vtEmail');
					var fName = $F('vfName');
					var fEmail = $F('vfEmail');
					var cType = $F('vcType');
					var cID = $F('vcID');
				}else if(prepend == "w"){
					var tName = $F('wtName');
					var tEmail = $F('wtEmail');
					var cType = $F('wcType');
					var cID = $F('wcID');
				}else if(prepend == "r"){
					var tName = $F('rtName');
					var tEmail = $F('rtEmail');
					var cType = $F('rcType');
					var cID = $F('rcID');
				}else if(prepend == "s"){
					var tName = $F('stName');
					var tEmail = $F('stEmail');
					var cType = $F('scType');
					var cID = $F('scID');
				}else if(prepend == "ra"){
					var tName = $F('ratName');
					var tEmail = $F('ratEmail');
					var cType = $F('raType');
					var cID = $F('raID');
				}else if(prepend == "p"){
					var tName = $F('ptName');
					var tEmail = $F('ptEmail');
					var cType = $F('pcType');
					var cID = $F('pcID');
				}
							
				var url = '/trophy/inc/send2friend_oneway.asp';
				var pars = 'cType=' + cType + '&cID=' + cID + '&tName=' + tName + '&tEmail=' + tEmail + '&fName=' + fName + '&fEmail=' + fEmail;
				
				//top.location.href = url + '?' + pars;
				
				var myAjax = new Ajax.Request(
					url, 
					{
						method: 'post', 
						parameters: pars, 
/*						onLoading: $('loader').show(),*/
						onComplete: function(transport)
							{
							var response = transport.responseText;
/*							$('loader').hide();*/
							try {alerterr(response);}
							catch(err){top.alerterr(response);}
							},
						onFailure: function()
						{ 
							try {alerterr('Something went wrong...');}
							catch(err){top.alerterr('Something went wrong...'); }
						}		// the TOP.alerterr is there in case the alerterr function is defined in the parent page and not in the iframe page. 
	
					});
				}


