//Unique popup cooke name... 
//nacalo obiazatelino bukva.
Cookie_unique = 'Cookie_ID_10301218';

image_width = 500;
image_height= 500;

// Path = "sc/";
Path = "/gallery/files/";

// close_points = '10, 10, 10, 10, 10, 10, 10, 10';
// click_points = '10, 10, 10, 10, 10, 10, 10, 10';
close_points = '360, 131, 360, 66, 425, 66, 425, 131';
click_points = '57, 492, 57, 13, 459, 13, 459, 492';


// Auto Hide

// need_hide = '<script>timeHided(5000)</script>'
// need_hide = ''
need_hide = '';


// Where to open window

// target = "_self";                           // Same window
 target = "_blank";                          // New window
//target = "_self";


// Action for Click

action = "href='http://inweb.net.ua'";                       // open URL case
//action = "href='#1' onClick='a_g_c();'";     // close popup case
//action = "HREF='#1' onClick='close_up();'";


// How many times to open

//openhow = "<script>timeHide()</script>";      // Open popup once per sesssion
//openhow = "";                                 // Open popup every time - leave empty
openhow="";


// Popup position

position = "width:95%;  top:21px;";            // Center case
//position = "left: Xpx;  top: Ypx;";            // Manual case
//position = "left: 500px;  top: 21px;";

//////////////////////////////////////////////

function close_up() {
	s_a = true; set_obj('__agd');  
	set_obj('overlay__agd'); 
	set_obj('__mid');  
	Make_OP('__agd','','hide'); 
	Make_OP('overlay__agd','','hide');  
	Make_OP('__mid','','hide');  
}  

function set_obj(n)  { if ((obj=f_O(n)) != null) { if (obj.style)  {obj=obj.style;obj.top = '-2111 px';}}} 

function f_O(n, d) {  
	var p,i,x;  
	if(!d) 
		d=document; 
		if((p=n.indexOf('?'))>0&&parent.frames.length) {  
			d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
		}
		if(!(x=d[n])&&d.all)
			x=d.all[n]; 
			for (i=0;!x&&i<d.forms.length;i++)
				x=d.forms[i][n]; 
			for(i=0;!x&&d.layers&&i<d.layers.length;i++)
				x=MM_findObj(n,d.layers[i].document);  
			if(!x && d.getElementById) x=d.getElementById(n); 
			return x;  
}  

function Make_OP() {   
	var i,p,v,obj,args=Make_OP.arguments;  
	for (i=0; i<(args.length-2); i+=3)
		if ((obj=f_O(args[i]))!=null) { v=args[i+2];  
		if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }  
 		obj.visibility=v; 	}  
}  
function setCookie(name, value, expires, path, domain, secure)  	{ 
	path = "/";
	var curCookie = name + '=' + escape(value) + 
	((expires) ? '; expires=' + expires.toGMTString() : '') + 
	((path) ? '; path=' + path : '') +  
	((domain) ? '; domain=' + domain : '') +  
	((secure) ? '; secure' : '');  
	//alert(curCookie);
	document.cookie = curCookie; 
} 

function getCookie(name)  	{ 	
	var dc = document.cookie; 
	var prefix = name + '='; 
	var begin = dc.indexOf('; ' + prefix); 
	if (begin == -1) { 
		begin = dc.indexOf(prefix); 
		if (begin != 0) return null; 
	} 
	else 
		begin += 2; var end = document.cookie.indexOf(';', begin); 
		if (end == -1) 
			end = dc.length; 
			return unescape(dc.substring(begin + prefix.length, end)); 
	} 
	
function timeHide() { 
	if (getCookie(Cookie_unique) != null) {	
		Make_OP('__agd','','hide');	Make_OP('overlay__agd','','hide');	
		Make_OP('div_f','','hide');	Make_OP('__mid','','hide');
	}
	else { UNHIDE_PP();  }	
	var now = new Date(); 	now.setTime(now.getTime() + 3 * 60 * 1000); now=""; setCookie(Cookie_unique, 1, now); 
	//alert (now);
} 

function timeHided(a) {setTimeout('goIA1()', a);} 
function goIA1() { 	
		Make_OP('__agd','','hide');	Make_OP('overlay__agd','','hide');	Make_OP('div_f','','hide');	Make_OP('__mid','','hide');
} 

function goIA() { 	
	Make_OP('__agd','','show');	Make_OP('overlay__agd','','show');	Make_OP('div_f','','show');	Make_OP('__mid','','show'); 
} 
function UNHIDE_PP() {setTimeout('goUNHIDE_PP()', 0);}  
	
function goUNHIDE_PP() {Make_OP('__mid','','show');}	
	
function load_alpha(mI){ 
	if(!mI) return;  
	var strNewHTML = "<span id=" + mI.id + " style=\"" + "width:" + mI.width + "px; height:" + mI.height + "px;" + " display:inline-block; " + ";" 
	strNewHTML += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + mI.src + "', sizingMethod='image');\"></span>";  
	mI.outerHTML = strNewHTML; 
} 


 ap = navigator.appName;sp = navigator.userAgent;n = sp.indexOf('Opera');
 var add_path;if (n == -1){add_path = " onLoad='load_alpha(this)' ";}
 document.write("<style>BODY{TEXT-ALIGN: left;}</style>"); 
 document.write("<MAP NAME=the_Map><AREA SHAPE='poly' ALT='Click here to close' COORDS='"+close_points+"'"); 
 document.write("alt='Close' onClick='close_up(); ' target=_self >");
 document.write("<AREA SHAPE='poly' ALT='' COORDS='"+click_points+"' "+action+" target='"+target+"' >");
 document.write("</MAP><div STYLE='text-align: left; margin:auto;'><div id='div_f' style='visibility:none;"); 
 document.write("position:absolute; height:auto;  text-align: center;  "+position+" z-index:2000; '>");
 document.write("<div id='__mid' style='position:relative;  margin-left: auto;  margin-right: auto; height: "+image_width+"; width:"+image_height+";'>");
 document.write("<div id='__agd' style='visibility:inherit; position:absolute;   left: -1px;  top: 1px;'>");
 document.write("<img style='display:block;' id=IA_3 src="+Path+"logo.png "+add_path+">");
 document.write("</div><div id='__pha' style='visibility:none; position:absolute; width:"+image_width+"px; height:"+image_height+"px;  top: 0px;  left: -1px; ' >");
 document.write("<div id = '__IAAnimImg' style=' width:"+image_width+"px; height:"+image_height+"	px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader ");
 document.write("(src="+Path+"pix.gif, sizingMethod=image' );></div></div><div id='overlay__agd' ");
 document.write("style='visibility:inherit; position:absolute;   left: -1px;  top: 1px;'> <img id='mt' ");
 document.write("src='"+Path+"pix.gif' width="+image_width+" height="+image_height+" BORDER=0 ALT='' USEMAP=#the_Map></div></div></div></div> ");
 document.write("<div></div>"+need_hide+openhow); 
 Make_OP('div_f','','hide');
if (n == -1){load_alpha(); }
if (ap == 'Microsoft Internet Explorer'){ window.attachEvent('onload', t_C);}
else if (ap == 'Netscape'){window.addEventListener('load', t_C, false);}
function t_C(){ UNHIDE_PP();}

//////////////////////////////////
var d="";

document.write("<SCRIPT>"+d+"</SCRIPT>");
