
function sendMail(nume,expeditor,destinatar,descriere){
	alert("nume="+nume+" \nexpeditor="+expeditor+" \ndestinatar="+destinatar+" \ndescriere="+descriere);
}


function getFlashEmbedCode(flash_Vars, is_mobile){

	var rezW=1, rezH=1;

	rezW=alertSize(1);
	rezH=alertSize(0);

	var flashVars=flash_Vars+"&fullScreenW="+rezW+"&fullScreenH="+rezH+"&orig="+is_mobile;

	//alert(flashVars);

	var retStr="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"100%\" height=\"100%\" id=\"playerR\" align=\"middle\">";
	retStr=retStr+"<param name=\"allowScriptAccess\" value=\"sameDomain\" />";
	retStr=retStr+"<param name=\"FlashVars\" value=\""+flashVars+"\" />";
	retStr=retStr+"<param name=\"movie\" value=\"player/playerCrypt.swf\" />";
	retStr=retStr+"<param name=\"quality\" value=\"high\" />";
	retStr=retStr+"<param name=\"scale\" value=\"noscale\" />";
	retStr=retStr+"<param name=\"bgcolor\" value=\"#000000\" />";
	retStr=retStr+"<embed src=\"player/playerCrypt.swf\" quality=\"high\" FlashVars=\""+flashVars+"\" scale=\"noscale\" bgcolor=\"#ffffff\" width=\"100%\" height=\"100%\" name=\"playerR\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";
	retStr=retStr+"</object>";

	return retStr;
}

function closeFullScreen(){
	var div=document.getElementById("player");
	div.style.width="420px";
	div.style.height="360px";

	div.style.left=10+"px";
	div.style.top=10+"px";

	move_player();
}

function getFullScreen(){
	//window.moveTo(0,0);
	//window.resizeTo(screen.width,screen.height);
	
	rezW=alertSize(1);
	rezH=alertSize(0);

	var div=document.getElementById("player");
	div.style.left="0px";
	div.style.top="0px";
	div.style.width=rezW+"px";
	div.style.height=rezH+"px";

	scroll(0,0);
}

function getY( oElement )
{
	var iReturnValue = 0;
	while( oElement != null ) {
		iReturnValue += oElement.offsetTop;
		oElement = oElement.offsetParent;
	}
	return iReturnValue;
}

function getX( oElement )
{
	var iReturnValue = 0;
	while( oElement != null ) {
		iReturnValue += oElement.offsetLeft;
		oElement = oElement.offsetParent;
	}
	return iReturnValue;
}

function alertSize(isWidth) {
  var myWidth = 0, myHeight = 0;

  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );

  //width=myWidth;
  //height=myHeight;
  if(isWidth)
	  return(myWidth);
  else
	  return(myHeight);
}

function move_player(){
	var difIE=0;
	var rezW=1, rezH=1;

	rezW=alertSize(1);
	rezH=alertSize(0);

	var div=document.getElementById("player");

	if(!div || (div.style.left=="0px" && div.style.top=="0px"))
		return;
	
	var divt=document.getElementById("player_table");

	var left_player=getX(divt)+2;
	var top_player=getY(divt)+6;

	div.style.top=top_player+"px";
	div.style.left=left_player+"px";


	var div2=document.getElementById("voting_flash");
	
	div2.style.left=left_player+290+"px";
	div2.style.top=top_player+400+"px";

	//var divf=document.getElementById("footer");
	//divf.innerHTML=getY(divt)+"adadada";
}