﻿// JScript File

var count = 0;

function OnMouseOverRegent( object )
{
    object.style.cursor = "hand";
    object.style.color = "#8C0000";	
    //object.style.text = "underline";		
}				
		
function OnMouseLeaveRegent( object )
{    	    
    object.style.color = "Navy";			
}

function DisplayImot( idImot, lang )
	{
		window.open( 'Imot.aspx?imot=' + idImot + '&lang=' + lang, '_blank', 'height=550,width=780, resizable=yes,location=yes,menubar=no,status=yes,toolbar=yes,scrollbars=yes,titlebar=no,dependent=yes', true );
    }
     
function GetXmlHttpObject()
    {         
	    var objXMLHttp = null;
	    if (window.XMLHttpRequest)
		    objXMLHttp = new XMLHttpRequest();
	    else if (window.ActiveXObject)
	        try
            {
              objXMLHttp = new ActiveXObject("Msxml2.XMLHTTP")
            }
            catch(e)
            {
              try
              {
                objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP")
              }
              catch(e) {}
            }
	    return objXMLHttp;
    }

function GetRandomeTopOffer()
    {           
        xmlHttp = GetXmlHttpObject();
	    if (xmlHttp == null)
	    {
		    return;
		} 	
					
		if (count > 0)
		{		    
		    xmlHttp.onreadystatechange = ReloadTopOffer;
	        xmlHttp.open("GET", "TopOffers.aspx?"+count, true);	    	    
	        xmlHttp.send(null);	  
	         	        	    
	    }	    
	    setTimeout(GetRandomeTopOffer, 10000);
	    count++;
    }    
        
function DisplayImot( idImot, lang )
{
	window.open( 'Imot.aspx?imot=' + idImot + '&lang=' + lang, '_blank', 'height=550,width=1000, resizable=yes,location=yes,menubar=no,status=yes,toolbar=yes,scrollbars=yes,titlebar=no,dependent=yes', true );
}

function DisplayPic( id )
{
	window.open( 'PicBig.aspx?id=' + id, '_blank', 'height=600,width=600,resizable=yes,location=no,menubar=no,status=yes,toolbar=yes,scrollbars=yes,titlebar=no,dependent=yes', true );
}