// DONN'T CHANGE ANYTHINS BELOW THIS LINE

var ev_flywin_fly_direction = 1;

// Movement speed pixels/sec
// Number from 1 to 2000

var ev_flywin_fly_speed=500;

// Window title

var ev_flywin_window_title="Join our newsletter, claim your FREEBIES...";

// Fly-Window width

var ev_flywin_window_width=490;

// Fly-Window height

var ev_flywin_window_height=378;

// THEME
// Possibles:
//		alphacube
//		darkx
//		default
//		mac_os_x
//		nuncio
//		spread
//		theme1

var ev_flywin_window_theme="mac_os_x";

// Time before appearing (milliseconds)

var ev_flywin_appear_delay=60000;

// Destination position - left

var ev_flywin_target_left=100;

// Destination position - top
var ev_flywin_target_top=100;

// Center window
// Possibles:
//	true - Fly win will be centered on the window 
//		(destination left and right will be ignored)
//
//	false - Fly win will fly to the "left" and "top" parems, inserted above

var ev_flywin_target_center=false;

// Does Fly-win appear each time, when some user come's in to the page
// Possibles:
// 	true - Fly-win will appear each time
// 	false - Fly-win will appear onlu first time

var ev_flywin_always_show=false;


var ev_flywin_path="http://resource.myhelphub.com/start/shared/selfdevnewsletter/";

// SECTION GLOBAL VARIABLES

var g_width=0, g_height=0, g_left=0, g_top=0, g_framedur=20.5, g_deltamove=0;	

// SECTION CHECK INPUT

if(ev_flywin_fly_speed < 1)
	ev_flywin_fly_speed=1;

if(ev_flywin_fly_speed > 2000)
	ev_flywin_fly_speed=2000;
	
g_deltamove=ev_flywin_fly_speed*g_framedur/1000;

// INCLUDE NEEDED THEME

ev_func_addStylesheet("themes/default.css");

switch ( ev_flywin_window_theme )
{
	case "alphacube": 
		ev_func_addStylesheet("themes/alphacube.css");
		break;
	case "darkx": 
		ev_func_addStylesheet("themes/darkX.css");
		break;
	case "mac_os_x": 
		ev_func_addStylesheet("themes/mac_os_x.css");
		break;
	case "nuncio": 
		ev_func_addStylesheet("themes/nuncio.css");
		break;
	case "spread": 
		ev_func_addStylesheet("themes/spread.css");
		break;
	case "theme1": 
		ev_func_addStylesheet("themes/theme1.css");
		break;
}

// CONSTRUCT DIALOG SOURCE

document.write("<div id=\"ev_flywin_content_src\" class=\"ev_flywin_content_src_class\" style=\"display:none\">");
document.write("<TABLE id=\"table1\"  cellSpacing=\"0\" cellPadding=\"0\" width=\"100%\" bgColor=\"#ffffff\" border=\"0\">");
document.write("<TBODY>	");
document.write("	<TR>		");
document.write("		<TD>");
document.write("			<br>");
document.write("			<P style=\"LINE-HEIGHT: normal; TEXT-ALIGN: center;\" align=\"center\"><IMG src=\""+ev_flywin_path+"title.gif\" style=\"position:relative;top:-10px;border: 0px solid blue;\">				");
document.write("				<FONT face=\"Arial\" size=\"2\">");
document.write("					<FONT color=\"#333333\"><br />");
document.write("						<b>We want to give you over $4000 in self growth FREEBIES!</b>");
document.write("					</FONT>");
document.write("				</FONT>			");
document.write("				<FONT face=\"Arial\" color=\"#333333\" size=\"2\">");
document.write("					<BR>All you have to do is join our EXCITING Self-Development Newsletter!<BR>Just enter your details below. You can unsubscribe at any time.");
document.write("				</FONT>				");
document.write("				<FORM name=\"subscribe\" action=\"http://www.myhelphub.com/start/addtolist.aspx\" method=\"get\" target=\"_blank\">				");
document.write("					<P style=\"LINE-HEIGHT: normal; TEXT-ALIGN: center;\" align=\"center\">");
document.write("						<FONT face=\"Arial\">");
document.write("							<FONT style=\"FONT-SIZE: 11.5pt\" color=\"#333333\">");
document.write("								<B>Enter your full name:</B><BR>");
document.write("							</FONT>");
document.write("							<INPUT style=\"FONT-SIZE: 10pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffffcc\" size=\"33\" name=\"fullname\">							");
document.write("						</FONT>");
document.write("					</P>");
					document.write("");
document.write("					<P style=\"LINE-HEIGHT: normal; TEXT-ALIGN: center;\" align=\"center\">");
document.write("						<FONT face=\"Arial\">");
document.write("							<FONT style=\"FONT-SIZE: 11.5pt\" color=\"#333333\">");
document.write("								<B>Enter your e-mail address:<BR></B>");
document.write("							</FONT>");
document.write("							<INPUT style=\"FONT-SIZE: 10pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffffcc\" size=\"33\" name=\"email\">							");
document.write("						</FONT>");
document.write("					</P>");
					document.write("");
document.write("					<P style=\"LINE-HEIGHT: normal; TEXT-ALIGN: center;\" align=\"center\">");
document.write("						<INPUT onclick=\"javascript:ev_func_close();\" type=\"submit\" value=\"Click HERE to subscribe NOW!\"><BR>					");
document.write("					</P>");
document.write("					<INPUT type=\"hidden\" value=\"http://www.myhelphub.com/start/shared/selfdevnewsletter/fail.aspx\" name=\"failure\">");
document.write("					<INPUT type=\"hidden\" value=\"true\" name=\"force\">");
document.write("					<INPUT type=\"hidden\" value=\"selfgrowthgiveaway\" name=\"list\">");
document.write("					<INPUT type=\"hidden\" value=\"Thank you! You have been subscribed!\" name=\"message\">");
document.write("					<INPUT type=\"hidden\" value=\"javascript:window.close();\" name=\"success\">");
document.write("				</FORM>");
document.write("			</p>");
document.write("		</TD>");
document.write("	</TR>");
document.write("</TBODY>");
document.write("</TABLE>");
document.write("");
document.write("</div>");


// SECTION CONSTRUCT DIALOG

document.write("<DIV id=\"ev_id_flywin_dialog\" class=\"dialog\" style=\"left: -2000px; top: -2000px; z-index: 150; width: "+ev_flywin_window_width+"px; height: "+ev_flywin_window_height+"px; \">");
document.write("<DIV onclick=\"javascript:ev_func_close();\" class=\"dialog_close\" id=\"dlgclose\"> </DIV>");
document.write("<DIV onclick=\"javascript:ev_func_minmax();\" class=\"dialog_minimize\" id=\"dlgminmax\"> </DIV>	");
document.write("<TABLE class=\"top_table_window\">");
	document.write("<TBODY>");
		document.write("<TR>");
			//document.write("<TD class=\"dialog_nw\"></TD>");
			document.write("<TD class=\"dialog_nw\" id=\"dlgnw\"></TD>");
			//document.write("<TD class=\"dialog_n\">");
			document.write("<TD class=\"dialog_n\" id=\"dlgn\">");
				document.write("<DIV class=\"dialog_title title_window top_draggable\" id=\"ev_id_flywin_dialog_title\">");
					document.write(ev_flywin_window_title);
				document.write("</DIV>");
			document.write("</TD>");
			//document.write("<TD class=\"dialog_ne\"></TD>");
			document.write("<TD class=\"dialog_ne\" id=\"dlgne\"></TD>");
		document.write("</TR>");
	document.write("</TBODY>");
document.write("</TABLE>");
document.write("<TABLE class=\"mid table_window\" id=\"ev_id_flywin_dialog_mid\">");
	document.write("<TBODY>");
		document.write("<TR>");
			document.write("<TD class=\"dialog_w\" id=\"ev_id_flywin_dialog_content_left\"/>");
			document.write("<TD valign=\"top\" class=\"dialog_content\" id=\"ev_id_flywin_dialog_content\">");
				document.write("<DIV class=\"dialog_content\" id=\"ev_id_flywin_dialog_content_text\" >");
					if(document.getElementById("ev_flywin_content_src"))
					{
						ev_flywin_src=document.getElementById("ev_flywin_content_src");
						document.write(ev_flywin_src.innerHTML);						
					}
				document.write("</DIV>");
			document.write("</TD>");
			document.write("<TD class=\"dialog_e\" id=\"ev_id_flywin_dialog_content_right\"/>");
	    document.write("</TR>");
	document.write("</TBODY>");
document.write("</TABLE>");
document.write("<TABLE class=\"table_window\" id=\"ev_id_flywin_dialog_bottom_table\" >");
	document.write("<TBODY>");
		document.write("<TR>");
			document.write("<TD class=\"dialog_sw\" id=\"ev_id_flywin_dialog_bottomleft\"></TD>");
	        document.write("<TD class=\"dialog_s\" id=\"ev_id_flywin_dialog_bottom\" >");				
			document.write("</TD>");
			document.write("<TD class=\"dialog_se\" id=\"ev_id_flywin_dialog_bottomright\"></TD>");
		document.write("</TR>");
	document.write("</TBODY>");
document.write("</TABLE>");
document.write("</DIV>");

// FUNCTIONS

// STYLESHEET

function ev_func_addStylesheet(path)
{
	var cssNode = document.createElement('link'); 
	cssNode.setAttribute('rel', 'stylesheet'); 	
	cssNode.setAttribute('type', 'text/css'); 
	cssNode.setAttribute('href', ev_flywin_path+path); 
	document.getElementsByTagName('head')[0].appendChild(cssNode);
}

// STYLE
function ev_func_getStyleById(elem_id,styleProp)
{
	var x = document.getElementById(elem_id);
	if (x.currentStyle)
	{
		var y = x.currentStyle[styleProp];
	}
	else if (window.getComputedStyle)
	{
		var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
	}
	return y;
}

function ev_func_getStyleByElement(el,styleProp)
{	
	if (el.currentStyle)
	{
		var y = el.currentStyle[styleProp];
	}
	else if (window.getComputedStyle)
	{
		var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
	}
	return y;
}

// COOKIE

function ev_func_setCookie(name, value, expires, path, domain, secure)
{
	var curCookie = name + "=" + escape(value) +((expires) ? "; expires=" + expires.toGMTString() : "") +((path) ? "; path=" + path : "") +((domain) ? "; domain=" + domain : "") +((secure) ? "; secure" : "");
	document.cookie = curCookie;
}

function ev_func_getCookie(name)
{
	var prefix = name + "=";
	var cookieStartIndex = document.cookie.indexOf(prefix);
	if (cookieStartIndex == -1)
		return null;
	
	var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);
	if (cookieEndIndex == -1)
		cookieEndIndex = document.cookie.length;
	
	return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}

function ev_func_deleteCookie(name, path, domain)
{   
	if ( ev_func_getCookie( name ) )
	{
		var _exp_ = new Date ( );
		var _iexpt_ = _exp_.getTime ( ) - 1;
		_exp_.setTime ( _iexpt_ );
		document.cookie = name + "=" +( path ? "; path=" + path : "") +( domain ? "; domain=" + domain : "") +"; expires=" + _exp_.toGMTString();
	}
}

function ev_func_getCookiesWork( )
{
	var d1 = new Date ( );
	var v;
	v = d1.getTime ( );
	v = v.toString ( );
	d1.setTime ( d1.getTime ( ) + 10000 );
	ev_func_setCookie( "ev_flywin_check_cookie", v, d1, "/" );
	return ev_func_getCookie( "ev_flywin_check_cookie" ) == v;
}

	
// SECTION TO RECONSTRUCT DIALOG

if ( document.getElementById ) 
{	
	ev_id_flywin_dlg = document.getElementById ( "ev_id_flywin_dialog" );		
	ev_id_flywin_dlg_bl = document.getElementById ( "ev_id_flywin_dialog_bottomleft" );
	ev_id_flywin_dlg_br = document.getElementById ( "ev_id_flywin_dialog_bottomright" );
	ev_id_flywin_dlg_b = document.getElementById ( "ev_id_flywin_dialog_bottom" );	
	ev_id_flywin_dlg_bt=document.getElementById ( "ev_id_flywin_dialog_bottom_table" );	
	
	ev_id_flywin_dlg_l=document.getElementById ( "ev_id_flywin_dialog_content_left" );
	ev_id_flywin_dlg_c=document.getElementById ( "ev_id_flywin_dialog_content" );
	ev_id_flywin_dlg_r=document.getElementById ( "ev_id_flywin_dialog_content_right" );	
	
	ev_id_flywin_dlg_c_text=document.getElementById ( "ev_id_flywin_dialog_content_text" );	
}

var ev_b_width=0, ev_bl_width=0, ev_br_width=0, ev_bt_width=0;
var ev_cl_width=0, ev_c_width=0, ev_cr_width=0;
var ev_c_height=0, ev_b_height=0, ev_t_height=0, ev_dlg_height=0;


switch ( ev_flywin_window_theme )
{
	case "alphacube": 
		ev_b_width=1;
		ev_bl_width=7;
		ev_br_width=7;

		ev_cl_width=7;
		ev_c_width=0;
		ev_cr_width=7;

		ev_c_height=0;
		ev_b_height=7;
		ev_t_height=14;
		break;
	case "darkx": 
		ev_b_width=1;
		ev_bl_width=5;
		ev_br_width=5;

		ev_cl_width=3;
		ev_c_width=0;
		ev_cr_width=3;

		ev_c_height=0;
		ev_b_height=3;
		ev_t_height=14;
		
		document.getElementById("dlgminmax").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/darkX/button-minimize-focused.png, sizingMethod=\"crop\")";
		document.getElementById("dlgclose").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/darkX/button-close-focused.png, sizingMethod=\"crop\")";	
		break;
	case "mac_os_x": 
		ev_b_width=1;
		ev_bl_width=31;
		ev_br_width=31;

		ev_cl_width=16;
		ev_c_width=0;
		ev_cr_width=16;

		ev_c_height=0;
		ev_b_height=40;
		ev_t_height=14;
		
		document.getElementById("dlgnw").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/mac_os_x/TL_Main.png, sizingMethod=\"crop\")";
		document.getElementById("dlgn").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/mac_os_x/T_Main.png, sizingMethod=\"scale\")";
		document.getElementById("dlgne").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/mac_os_x/TR_Main.png, sizingMethod=\"crop\")";
		
		document.getElementById("ev_id_flywin_dialog_content_left").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/mac_os_x/L_Main.png, sizingMethod=\"scale\")";
		document.getElementById("ev_id_flywin_dialog_content_right").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/mac_os_x/R_Main.png, sizingMethod=\"scale\")";
		
		document.getElementById("ev_id_flywin_dialog_bottomleft").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/mac_os_x/BL_Main.png, sizingMethod=\"crop\")";		
		document.getElementById("ev_id_flywin_dialog_bottom").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/mac_os_x/B_Main.png, sizingMethod=\"scale\")";
		document.getElementById("ev_id_flywin_dialog_bottomright").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/mac_os_x/BR_Main.png, sizingMethod=\"crop\")";		
		break;
	case "nuncio": 
		ev_b_width=1;
		ev_bl_width=12;
		ev_br_width=21;

		ev_cl_width=12;
		ev_c_width=0;
		ev_cr_width=21;

		ev_c_height=0;
		ev_b_height=18;
		ev_t_height=14;
		
		document.getElementById("dlgnw").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/nuncio/top_left.png, sizingMethod=\"crop\")";
		document.getElementById("dlgn").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/nuncio/top_mid.png, sizingMethod=\"scale\")";
		document.getElementById("dlgne").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/nuncio/top_right.png, sizingMethod=\"crop\")";
		
		document.getElementById("ev_id_flywin_dialog_content_left").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/nuncio/center_left.png, sizingMethod=\"scale\")";
		document.getElementById("ev_id_flywin_dialog_content_right").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/nuncio/center_right.png, sizingMethod=\"scale\")";
		
		document.getElementById("ev_id_flywin_dialog_bottomleft").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/nuncio/bottom_left.png, sizingMethod=\"crop\")";		
		document.getElementById("ev_id_flywin_dialog_bottom").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/nuncio/bottom_mid.png, sizingMethod=\"scale\")";
		document.getElementById("ev_id_flywin_dialog_bottomright").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/nuncio/bottom_right.png, sizingMethod=\"crop\")";		
		
		document.getElementById("dlgminmax").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/nuncio/minimize.png, sizingMethod=\"crop\")";
		document.getElementById("dlgclose").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+ev_flywin_path+"themes/nuncio/close.png, sizingMethod=\"crop\")";	
		break;
	case "spread": 
		ev_b_width=1;
		ev_bl_width=7;
		ev_br_width=7;

		ev_cl_width=7;
		ev_c_width=0;
		ev_cr_width=7;

		ev_c_height=0;
		ev_b_height=7;
		ev_t_height=14;
		break;
	case "theme1": 
		ev_b_width=1;
		ev_bl_width=16;
		ev_br_width=12;

		ev_cl_width=7;
		ev_c_width=0;
		ev_cr_width=4;

		ev_c_height=0;
		ev_b_height=24;
		ev_t_height=14;
	case "default": 
		ev_b_width=1;
		ev_bl_width=9;
		ev_br_width=9;

		ev_cl_width=2;
		ev_c_width=0;
		ev_cr_width=2;

		ev_c_height=0;
		ev_b_height=19;
		ev_t_height=14;
		break;
}

ev_bt_width=ev_func_getStyleById("ev_id_flywin_dialog","width");
ev_dlg_height=ev_func_getStyleById("ev_id_flywin_dialog","height");	

ev_bt_width=parseInt(ev_bt_width);
ev_dlg_height=parseInt(ev_dlg_height);
/*
	
ev_b_width=ev_func_getStyleById("ev_id_flywin_dialog_bottom","width");
ev_bl_width=ev_func_getStyleById("ev_id_flywin_dialog_bottomleft","width");
ev_br_width=ev_func_getStyleById("ev_id_flywin_dialog_bottomright","width");

ev_cl_width=ev_func_getStyleById("ev_id_flywin_dialog_content_left","width");
ev_c_width=ev_func_getStyleById("ev_id_flywin_dialog_content","width");
ev_cr_width=ev_func_getStyleById("ev_id_flywin_dialog_content_right","width");	


ev_c_height=ev_func_getStyleById("ev_id_flywin_dialog_content","height");
ev_b_height=ev_func_getStyleById("ev_id_flywin_dialog_bottom","height");
ev_t_height=ev_func_getStyleById("ev_id_flywin_dialog_title","height");





ev_b_width=parseInt(ev_b_width);
ev_bl_width=parseInt(ev_bl_width);
ev_br_width=parseInt(ev_br_width);

ev_cl_width=parseInt(ev_cl_width);
ev_c_width=parseInt(ev_c_width);
ev_cr_width=parseInt(ev_cr_width);

ev_c_height=parseInt(ev_c_height);
ev_b_height=parseInt(ev_b_height);
ev_t_height=parseInt(ev_t_height);

*/
// BOTTOM WIDTH

ev_id_flywin_dlg_bt.style.width=ev_bt_width+"px";

ev_b_width=ev_bt_width-ev_bl_width-ev_br_width;

ev_id_flywin_dlg_b.style.width=ev_b_width+"px";


// CONTENT WIDTH

ev_c_width=ev_bt_width-ev_cl_width-ev_cr_width;
ev_id_flywin_dlg_c.style.width=ev_c_width+"px";
ev_id_flywin_dlg_c_text.style.width=ev_c_width+"px";

// CONTENT HEIGHT

ev_c_height=ev_dlg_height-ev_b_height-ev_t_height;

ev_id_flywin_dlg_c.style.height=ev_c_height+"px";
ev_id_flywin_dlg_c_text.style.height=ev_c_height+"px";

g_width=ev_bt_width;
g_height=ev_dlg_height;

g_left=ev_flywin_target_left;
g_top=ev_flywin_target_top;

if(ev_flywin_target_center)
{
	g_left=document.body.clientWidth/2-g_width/2;
	g_top=document.body.clientHeight/2-g_height/2;
}


// SECTION TO MAKE DIALOG MOVABLE

if ( document.getElementById ) 
{
	ev_flywin_id = document.getElementById ( "ev_id_flywin_dialog" );
	ev_flywin_title_id = document.getElementById ( "ev_id_flywin_dialog_title" );
	ev_flywin_content=document.getElementById ( "ev_id_flywin_dialog_mid" );
}
else 
{
	ev_flywin_id = document.all ["ev_id_flywin_dialog"]; 
	ev_flywin_title_id = document.all ["ev_id_flywin_dialog_title"]; 
	ev_flywin_content = document.all ["ev_id_flywin_dialog_mid"]; 
}
		
function ev_func_minmax ( )
{	
   //if ( document.getElementById ) 
   //{		
	//	content = document.getElementById ( "ev_id_flywin_dialog_mid" );	
	//}
	//else
	//{
	//	content = document.all ["ev_id_flywin_dialog_mid"];
	//}

	
	if ( ev_flywin_content.style.display == "none" ) 
    {       
		ev_flywin_content.style.display = ""; 
		//ev_flywin_id.style.height = "170px";
	}
	else
	{
		ev_flywin_content.style.display = "none";
		//ev_flywin_id.style.height = "20px";
	}
}

function ev_func_close ( )
{
	ev_flywin_id.style.display = "none";
}

var ev_flywin_dialog_left_offset = 0, ev_flywin_dialog_top_offset = 0;

function ev_func_getleftpos ( )
{
   return ( ( window.pageXOffset ) ? window.pageXOffset : document.body.scrollLeft ) + ev_flywin_dialog_left_offset;
}

function ev_func_gettoppos ( )
{
   return ( ( window.pageYOffset ) ? window.pageYOffset : document.body.scrollTop ) + ev_flywin_dialog_top_offset;
}

function ev_func_restorepos ( )
{
   ev_flywin_id.style.top = ev_func_gettoppos ( );
   ev_flywin_id.style.left = ev_func_getleftpos ( );
   setTimeout ( "ev_func_restorepos ( );", 50 );
}

function ev_func_calcpos ( )
{
   if ( ev_flywin_dialog_left_offset != (g_left) || ev_flywin_dialog_top_offset != (g_top) )
   {
		if ( ev_flywin_dialog_left_offset != (g_left) )
			if ( Math.abs ( ev_flywin_dialog_left_offset - (g_left) ) <= g_deltamove )
				ev_flywin_dialog_left_offset = (g_left);
			else if ( ev_flywin_dialog_left_offset < (g_left) )
				ev_flywin_dialog_left_offset += g_deltamove;
			else 
				ev_flywin_dialog_left_offset -= g_deltamove;

		if ( ev_flywin_dialog_top_offset != (g_top) )
			if ( Math.abs ( ev_flywin_dialog_top_offset - (g_top) ) <= g_deltamove )
				ev_flywin_dialog_top_offset = (g_top); 
			else if ( ev_flywin_dialog_top_offset < (g_top) )
				ev_flywin_dialog_top_offset += g_deltamove;
			else  
				ev_flywin_dialog_top_offset -= g_deltamove; 

		ev_flywin_id.style.top  = ev_func_gettoppos ( );
		ev_flywin_id.style.left = ev_func_getleftpos ( ); 
		setTimeout ( "ev_func_calcpos();", g_framedur);
	}
	else
		ev_func_restorepos ( );
}

function ev_func_init ( ) 
{
	ev_flywin_dialog_left_offset = (g_left);
	ev_flywin_dialog_top_offset = (g_top);
	// Number in switch is an direction
	switch ( ev_flywin_fly_direction )
	{
		case 3: 
			ev_flywin_dialog_left_offset = -g_width;
			break;
		case 4:
			ev_flywin_dialog_left_offset = ( ( window.innerWidth ) ? window.innerWidth : document.body.clientWidth );
			break;
		case 1: 
			ev_flywin_dialog_top_offset = -g_height;
			break;
		case 2:
			ev_flywin_dialog_top_offset = ( ( window.innerHeight ) ? window.innerHeight : document.body.clientHeight);
			break;
	}

	ev_flywin_id.style.top  = ev_func_gettoppos ( );
	ev_flywin_id.style.left = ev_func_getleftpos ( );
	ev_flywin_id.style.display = "";
	ev_func_calcpos ( ); 
}

if(!(ev_func_getCookie('ev_flywin_popup_cookie_selfdevnewsletter') == 'ev_popup_selfdevnewsletter'))
{
	var s = new Date();
	var s1 = new Date ( );
	s1.setTime ( s.getTime ( ) + 10 * 365 * 24 * 60 * 60 * 1000 );
	ev_func_setCookie('ev_flywin_popup_cookie_selfdevnewsletter','ev_popup_selfdevnewsletter',s1,'/');
	
	setTimeout ( "ev_func_init ( );", ev_flywin_appear_delay );
}
else
{
	if(ev_flywin_always_show)
		setTimeout ( "ev_func_init ( );", ev_flywin_appear_delay );
}
	
var ev_flywin_var_tmp1, ev_flywin_var_tmp2; 

function ev_func_onmousemove ( e ) 
{
   v160 = ( document.all ) ? event.clientX : e.clientX;
   v161 = ( document.all ) ? event.clientY : e.clientY;

   ev_flywin_dialog_left_offset += v160 - ev_flywin_var_tmp1;
   ev_flywin_dialog_top_offset += v161 - ev_flywin_var_tmp2;
   ev_flywin_var_tmp1 = v160;
   ev_flywin_var_tmp2 = v161;

   ev_flywin_id.style.top  = ev_func_gettoppos ( );
   ev_flywin_id.style.left = ev_func_getleftpos ( );
}

function ev_func_mouseproc ( ) { }
function ev_func_onmouseup ( )
{
   document.onmousemove = ev_func_mouseproc;
   document.onmouseup   = ev_func_mouseproc;
}

function ev_func_onmousedown ( v165 )
{
   ev_flywin_var_tmp1 = ( document.all ) ? event.clientX : v165.clientX;
   ev_flywin_var_tmp2 = ( document.all ) ? event.clientY : v165.clientY;
   document.onmousemove = ev_func_onmousemove;
   document.onmouseup   = ev_func_onmouseup;
}

ev_flywin_title_id.onmousedown = ev_func_onmousedown;
