email1_value	= 'Your Email';

email2_value	= "Friend's Email";

message_value	= 'Your message (optional)';



var source;

var agent = navigator.userAgent.toLowerCase();



// Globals

// Major version of Flash required

var requiredMajorVersion = 9;

// Minor version of Flash required

var requiredMinorVersion = 0;

// Minor version of Flash required

var requiredRevision = 64;



function testAndShowFlash(phpName)

{

	// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)

	var hasProductInstall = DetectFlashVer(6, 0, 65);



	// Version check based upon the values defined in globals

	var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);



	// Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback

	if ( hasProductInstall && !hasReqestedVersion ) {

		// MMdoctitle is the stored document.title value used by the installation process to close the window that started the process

		// This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed

		// DO NOT MODIFY THE FOLLOWING FOUR LINES

		// Location visited after installation is complete if installation is required

		var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";

		var MMredirectURL = window.location;

		document.title = document.title.slice(0, 47) + " - Flash Player Installation";

		var MMdoctitle = document.title;



		AC_FL_RunContent(

			"src", "playerProductInstall",

			"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",

			"width", "1000",

			"height", "560",

			"align", "middle",

			"id", "detectionExample",

			"quality", "high",

			"bgcolor", "#ffffff",

			"name", "detectionExample",

			"allowScriptAccess","always",

			"type", "application/x-shockwave-flash",

			"pluginspage", "http://www.adobe.com/go/getflashplayer"

		);

	} else if (hasReqestedVersion) {

		// if we've detected an acceptable version

		// embed the Flash Content SWF when all tests are passed

	

		showFlash('1000', '560', 'video', phpName, '', 'opaque', 'true');

	} else {  // flash is too old or we can't detect the plugin

		var alternateContent = 'This content requires the Adobe Flash Player. '

		+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';

		document.write(alternateContent);  // insert non-flash content

	}

}



function showFlash(width, height, flashName, phpName, flashPath, wmode, allowFullScreen)

{

	AC_FL_RunContent(

			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,64,0',

			'FlashVars',  'videoxml=' + phpName,

			'width', width,

			'height', height,

			'src', flashPath + flashName,

			'quality', 'high',

			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',

			'align', 'middle',

			'play', 'true',

			'loop', 'true',

			'scale', 'showall',

			'wmode', wmode,

			'devicefont', 'false',

			'id', flashName,

			'bgcolor', '#ffffff',

			'name', flashName,

			'menu', 'true',

			'allowFullScreen', allowFullScreen,

			'allowScriptAccess','always',

			'movie', flashPath + flashName,

			'salign', ''

		);

}



function activeImage(src, obj)

{

  source=src;

  ownerDiv = obj.parentNode.parentNode;

  ownerDiv.style.backgroundImage='url('+src+')';

  if(agent.indexOf("msie") != -1)

  {

    obj.src="./images/blank.gif";

    obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='./images/img_act.png', sizingMethod='scale')";

  }

  else

  {

    obj.src="./images/img_act.png";

  }

}



function normalImage(obj)

{

  ownerDiv = (obj.parentNode).parentNode;

  ownerDiv.style.backgroundImage='none';

  obj.src=source;

}



function init()

{

	// link

	YAHOO.example.container.link_panel = new YAHOO.widget.Panel('link_panel', { width:'450px', visible:false, constraintoviewport:true, modal: false } );

	YAHOO.example.container.link_panel.render();

	YAHOO.util.Event.addListener('link_show', 'click', YAHOO.example.container.link_panel.show, YAHOO.example.container.link_panel, true);

	YAHOO.util.Event.addListener('link_hide', 'click', YAHOO.example.container.link_panel.hide, YAHOO.example.container.link_panel, true);

	// mail

	YAHOO.example.container.mail_panel = new YAHOO.widget.Panel('mail_panel', { width:'450px', visible:false, constraintoviewport:true, modal: false } );

	YAHOO.example.container.mail_panel.render();

	YAHOO.util.Event.addListener('mail_show', 'click', YAHOO.example.container.mail_panel.show, YAHOO.example.container.mail_panel, true);

	YAHOO.util.Event.addListener('mail_hide', 'click', YAHOO.example.container.mail_panel.hide, YAHOO.example.container.mail_panel, true);

}



function back()

{

	history.back();

}



function canSendMain()

{

	email1		= document.getElementById('email1');

	email2		= document.getElementById('email2');

	message		= document.getElementById('message');

	

	if (email1.value == '' || email1.value == email1_value || !/^([\w-~_]+\.)*[\w-~_]+@([\w-_]+\.){1,3}\w{2,3}$/.test(email1.value))

	{

		email1.value		= email1_value;

		email1.className	= 'dialog_input_error';

		return false;

	}

	

	if (email2.value == '' || email2.value == email2_value || !/^([\w-~_]+\.)*[\w-~_]+@([\w-_]+\.){1,3}\w{2,3}$/.test(email2.value))

	{

		email2.value		= email2_value;

		email2.className	= 'dialog_input_error';

		return false;

	}

	

	if (message.value == message_value)

		message.value = '';

	

	return true;

}



function onFocusTypeText(element)

{

	if (element.value == email1_value || element.value == email2_value)

		element.value = '';

	element.className = 'dialog_input';

}



function afterSendMail(str_message)

{

	parent.document.getElementById('send_message').innerText	= str_message;

	parent.document.getElementById('send_message').className	= 'green_dialog_text';

	parent.document.getElementById('email1').value				= email1_value;

	parent.document.getElementById('email2').value				= email2_value;

	parent.document.getElementById('message').value				= message_value;

}



function setInputTextValues()

{

	document.getElementById('send_message').innerText	= 'Send email to your Friend';

	document.getElementById('send_message').className	= 'dialog_text';

	document.getElementById('email1').value				= email1_value;

	document.getElementById('email2').value				= email2_value;

	document.getElementById('message').value			= message_value;

}