/* pickpop.js */
/* need tigra_hints.js */
/* admz_myHint  */

var admzHINTS_CFG = {
'wise'       : true,	// don't go off screen, don't overlap the object in the document
'margin'     : 10,	// minimum allowed distance between the hint and the window edge (negative values accepted)
'gap'        : 20,	// minimum allowed distance between the hint and the origin (negative values accepted)
'align'      : 'tcbc',	// align of the hint and the origin (by first letters origin's top|middle|bottom left|center|right to hint's top|middle|bottom left|center|right)
'css'        : 'hintsClass', // a style class name for all hints, applied to DIV element (see style section in the header of the document)
'show_delay' : 200,	// a delay between initiating event (mouseover for example) and hint appearing
'hide_delay' : 0,	// a delay between closing event (mouseout for example) and hint disappearing
'follow'     : false,	// hint follows the mouse as it moves
'z-index'    : 100,	// a z-index for all hint layers
'IEfix'      : false,	// fix IE problem with windowed controls visible through hints (activate if select boxes are visible through the hints)
'IEtrans'    : [null, null],	// [show transition, hide transition] - nice transition effects, only work in IE5+
//'IEtrans'    : ['blendTrans(DURATION=.3)', 'blendTrans(DURATION=.3)'],
'opacity'    : 100	// opacity of the hint in %%
};

var admzMess = [];
admzMess[0] = ' '; //dummy
var admz_myHint = new THints( admzMess, admzHINTS_CFG );

var paidLids = new Array();

function in_array( needle, haystack, argStrict )
{
        var found = false, key, strict = !!argStrict;

        for (key in haystack) {
                if ((strict && haystack[key] === needle) || (!strict && haystack[key] == needle)) {
                        found = true;
                        break;
                }
        }
        return found;
}

function adsWrite( event, idx, lid )
{
	if ( event != null ) {
		var v_url;
		var v_esc = "admz_d" + idx;
		var v_width;

		if (( screen.width < 1024 || screen.heith < 768 )){
			//v_url = "img/nouensamp" + lid + ".jpg";
			v_url = "img/dat/" + lid + ".gif";
			if ( in_array( lid, paidLids )) {
				v_width = 320;
			} else {
				v_width = 160;
			}
		} else{
			if ( in_array( lid, paidLids )) {
			//	v_url = "img/nouensamp" + lid + ".jpg";
				v_url = "img/dat/" + lid + "l.gif";
				v_width = 640;
			} else {
				//v_url = "img/nouensamp" + lid + ".jpg";
				v_url = "img/dat/" + lid + ".gif";
				v_width = 320;
			}
		}
		
		var hint_id = 'h' + admz_myHint.n_id + '_' + '0';

		document.getElementById(hint_id).innerHTML = 
			document.getElementById('admz_h'+lid).innerHTML;

		//document.getElementById(hint_id).innerHTML = "<img src='"+ v_url + "' width='"+ v_width + "' />";
		//document.getElementById(hint_id).innerHTML = "<img src='"+ v_url + "' />";

		admz_myHint.show( 0 );
	}
}


function adsFocus( event, idx, lid )
{
        if ( admz_myHint.o_lastHintID != 1 ) {
        	adsWrite( event, idx, lid );
	}
}

function adsDefocus()
{
	if ( admz_myHint.o_lastHintID != 1 ) {
		admz_myHint.hide();
	}
}

/*
var mvo = { "obj": null, "offsetX": 0, "offsetY": 0};

function onMouseDown( e )
{
        mvo.obj = document.getElementById("h0_1"); //2nd window ■

        if ( document.all ) {
                mvo.offsetX = event.offsetX + 2;
                mvo.offsetY = event.offsetY + 2;
        } else if ( mvo.obj.getElementsByTagName ) {
                mvo.offsetX = e.pageX - parseInt( mvo.obj.style.left );
                mvo.offsetY = e.pageY - parseInt( mvo.obj.style.top );
        }
        return false;
}

function local_f_hintPosition (e_element, e_hint, a_params )
{
        var n_hintLeft;
        var n_hintTop;

        if ( document.all ) {
                n_hintLeft  = n_mouseX - mvo.offsetX;
                n_hintTop  = n_mouseY - mvo.offsetY;
        } else if ( mvo.obj.getElementsByTagName ) {
                if ( n_mouseX > 0 ) { n_hintLeft = n_mouseX - mvo.offsetX; }
                if ( n_mouseY > 0 ) { n_hintTop = n_mouseY - mvo.offsetY; }
        }

        e_hint.style.left = n_hintLeft + 'px';
        e_hint.style.top = n_hintTop + 'px';

        // synchronize iframe if exists
        var e_iframe = getElement( e_hint.id + '_if' );
        if ( e_iframe ) {
                e_iframe.style.left = n_hintLeft + 'px';
                e_iframe.style.top = n_hintTop + 'px';
                //e_iframe.style.width = n_hintWidth + 'px';
                //e_iframe.style.height = n_hintHeight + 'px';
        }
}

function onMouseMove( e )
{
        if (!e && window.event)
                e = window.event;
        if (!e)
                return true;

        if ( !mvo.obj ) {
                return true;
        }

        n_mouseX = e.pageX ? e.pageX : e.clientX + f_scrollLeft();
        n_mouseY = e.pageY ? e.pageY + 2 : e.clientY + f_scrollTop();

        var o_hint = A_HINTS[0];
        if (o_hint.o_lastHintID)
                local_f_hintPosition(o_hint.a_elements[o_hint.o_lastHintID], o_hint.a_hints[o_hint.o_lastHintID], o_hint.a_cfg);
        return false;
}
function onMouseUp( e )
{
	mvo.obj = null;
}
*/

