// JavaScript Document

function swapimg (s_arr,s_obj,s_url) {

	s_obj.src=s_url; 
	
	document.getElementById('arrow_nah').style.display='none'; // HIDE id arrow_nah
	document.getElementById('arrow_gran').style.display='none'; // HIDE id arrow_gran
	document.getElementById('arrow_praj').style.display='none'; // HIDE id arrow_praj
	document.getElementById('arrow_yar').style.display='none'; // HIDE id arrow_yar
		
	s_arr.style.display='block'; // SHOW
	
	return;
}



function openindex(url,title)
      {

OpenWindow=window.open(url, "", "left=0,top=0,resizable=0,HEIGHT=200,WIDTH=200,toolbar=0,scrollbars=0,menubar=0, status=0,directories=no, location=no");
OpenWindow.document.write('<html> \n');
OpenWindow.document.write('<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> \n');
OpenWindow.document.write('<TITLE>'+title+'</TITLE> \n');
OpenWindow.document.write('<script language="javascript"> \n');
OpenWindow.document.write('var NS = (navigator.appName=="Netscape")?true:false; \n');
OpenWindow.document.write('function fitPic() { \n');
OpenWindow.document.write('document.images[1].style.visibility = "hidden"; \n');
OpenWindow.document.write('iWidth = (NS)?window.innerWidth:document.body.clientWidth; \n');
OpenWindow.document.write('iHeight = (NS)?window.innerHeight:document.body.clientHeight; \n');
OpenWindow.document.write('var browserName=navigator.appName; \n ');
OpenWindow.document.write('var bug_w = (browserName=="Microsoft Internet Explorer")?6:15; \n ');
OpenWindow.document.write('var bug_h = (browserName=="Microsoft Internet Explorer")?0:15; \n ');

OpenWindow.document.write('iWidth = document.images[0].width - iWidth+((window.screen.width)<(document.images[0].width)?bug_w:(window.screen.height)<(document.images[0].height+18)?bug_w:0); \n'); //FIND SCROLL X

OpenWindow.document.write('iHeight = document.images[0].height - iHeight+((window.screen.height)<(document.images[0].height)?bug_h:(window.screen.width)<(document.images[0].width)?bug_h:0); \n'); //FIND SCROLL Y

OpenWindow.document.write('var client_w = (window.screen.width); \n');
OpenWindow.document.write('var client_h = (window.screen.height); \n');
OpenWindow.document.write('window.resizeBy(iWidth, iHeight); \n');
OpenWindow.document.write('var mover_x = (((eval(client_w))-document.images[0].width)/2)<=0 ? 0 : (((eval(client_w))-document.images[0].width)/2); \n');
OpenWindow.document.write('var mover_y =(((eval(client_h))-document.images[0].height)/2)<=0 ? 0 : (((eval(client_h))-document.images[0].height)/2); \n')
OpenWindow.document.write('window.moveTo(mover_x, mover_y); \n');
// OpenWindow.document.write('alert(browserName);');
OpenWindow.document.write('self.focus(); \n');
OpenWindow.document.write('}; \n');
OpenWindow.document.write('</script> \n');
OpenWindow.document.write('</head> \n');
OpenWindow.document.write('<BODY style="margin:0px; padding:0px;" onResize="fitPic();"> \n');
OpenWindow.document.write('<a href="#" onClick="javascript:window.close();"> \n');
OpenWindow.document.write('<img src="'+url+'" border="0" onLoad="fitPic();" style="float:left;;"/></a> \n');
OpenWindow.document.write('<img src="/java/loader2.gif" border="0" style="position:absolute; top:100px; left:100px;"/></a> \n');
OpenWindow.document.write('</BODY> \n');
OpenWindow.document.write('</HTML> \n');
OpenWindow.document.close();
	  }
	  
	  
	  //v1.0
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

