function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  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 MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

var mData = new Array();function mapInit(){mData[19] = new Array();mData[19][0]="г. Кентау";mData[19][1]="120,9";mData[19][2]="80,5";mData[19][3]="";document.getElementById('mapsMap').innerHTML += '<area shape="rect" coords="208,330,256,344" href="/view.php?id=176"  title="г. Кентау" alt="г. Кентау" onmouseover="mapShowInfo(19)" onmouseout="mapHideInfo()" />';mData[20] = new Array();mData[20][0]="г. Кентау";mData[20][1]="120,9";mData[20][2]="80,5";mData[20][3]="";document.getElementById('mapsMap').innerHTML += '<area shape="circle" coords="261,341,7" href="/view.php?id=176"  title="г. Кентау" alt="г. Кентау" onmouseover="mapShowInfo(20)" onmouseout="mapHideInfo()" />';mData[21] = new Array();mData[21][0]="г. Арысь";mData[21][1]="6300";mData[21][2]="61,4";mData[21][3]="";document.getElementById('mapsMap').innerHTML += '<area shape="circle" coords="295,492,7" href="/view.php?id=184"  title="г. Арысь" alt="г. Арысь" onmouseover="mapShowInfo(21)" onmouseout="mapHideInfo()" />';mData[22] = new Array();mData[22][0]="г. Арысь";mData[22][1]="6300";mData[22][2]="61,4";mData[22][3]="";document.getElementById('mapsMap').innerHTML += '<area shape="rect" coords="246,493,295,507" href="/view.php?id=184"  title="г. Арысь" alt="г. Арысь" onmouseover="mapShowInfo(22)" onmouseout="mapHideInfo()" />';mData[23] = new Array();mData[23][0]="г. Туркестан";mData[23][1]="9400";mData[23][2]="195,6";mData[23][3]="";document.getElementById('mapsMap').innerHTML += '<area shape="rect" coords="217,374,291,388" href="/view.php?id=168"  title="г. Туркестан" alt="г. Туркестан" onmouseover="mapShowInfo(23)" onmouseout="mapHideInfo()" />';mData[24] = new Array();mData[24][0]="г. Туркестан";mData[24][1]="9400";mData[24][2]="195,6";mData[24][3]="";document.getElementById('mapsMap').innerHTML += '<area shape="circle" coords="234,368,7" href="/view.php?id=168"  title="г. Туркестан" alt="г. Туркестан" onmouseover="mapShowInfo(24)" onmouseout="mapHideInfo()" />';mData[25] = new Array();mData[25][0]="г. Шымкент";mData[25][1]="300";mData[25][2]="526,6";mData[25][3]="";document.getElementById('mapsMap').innerHTML += '<area shape="rect" coords="340,485,408,499" href="/view.php?id=159"  title="г. Шымкент" alt="г. Шымкент" onmouseover="mapShowInfo(25)" onmouseout="mapHideInfo()" />';mData[26] = new Array();mData[26][0]="г. Шымкент";mData[26][1]="300";mData[26][2]="526,6";mData[26][3]="";document.getElementById('mapsMap').innerHTML += '<area shape="circle" coords="376,506,8" href="/view.php?id=159"  title="г. Шымкент" alt="г. Шымкент" onmouseover="mapShowInfo(26)" onmouseout="mapHideInfo()" />';mData[1] = new Array();mData[1][0]="Мактааральский район";mData[1][1]="1800";mData[1][2]="248,5";mData[1][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="221,704,221,704,211,704,209,710,213,713,220,715,227,720,237,729,244,731,250,737,256,738,262,741,265,745,274,743,286,741,288,739,284,735,280,733,274,721,274,710,275,704,274,700,274,694,270,691,265,691,264,688,257,690,246,689,239,684,235,683,229,686,224,680,221,684,224,688,222,693,222,699,221,702" href="/view.php?id=129"  title="Мактааральский район" alt="Мактааральский район" onmouseover="mapShowInfo(1)" onmouseout="mapHideInfo()" />';mData[2] = new Array();mData[2][0]="Арысский район";mData[2][1]="0";mData[2][2]="25,1";mData[2][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="91,544,200,546,199,542,202,538,204,541,207,541,207,536,210,533,210,527,211,525,218,526,218,539,227,540,227,547,233,547,233,556,234,551,233,547,233,540,240,547,259,547,289,540,301,536,304,539,303,544,310,547,304,557,308,557,310,555,312,557,315,553,317,554,322,552,319,549,319,547,324,522,332,518,332,518,339,514,326,509,319,520,312,509,309,509,309,506,303,501,296,494,299,491,307,497,312,497,312,490,314,488,310,483,310,477,309,473,331,452,331,446,323,453,311,451,299,447,296,450,305,459,298,475,287,475,283,478,279,478,277,481,239,484,238,489,239,491,241,494,239,506,180,507,89,529" href="#"  title="Арысский район" alt="Арысский район" onmouseover="mapShowInfo(2)" onmouseout="mapHideInfo()" />';mData[3] = new Array();mData[3][0]="Шардаринский район";mData[3][1]="13000";mData[3][2]="70";mData[3][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="210,666,211,667,196,667,193,664,190,668,82,668,76,642,61,632,51,556,72,559,76,566,94,568,91,544,200,546,199,542,202,538,204,541,207,541,207,536,210,533,210,527,211,525,218,526,218,539,227,540,227,547,233,547,234,551,233,556,228,560,228,566,228,566,225,571,229,576,219,586,221,589,221,605,225,612,224,619,227,622,225,628,225,636,231,640,230,641,230,647,234,649,243,642,247,645,244,655,222,655,216,650,214,650,214,652,209,654,206,657,208,661,212,665" href="/view.php?id=126"  title="Шардаринский район" alt="Шардаринский район" onmouseover="mapShowInfo(3)" onmouseout="mapHideInfo()" />';mData[4] = new Array();mData[4][0]="Сарыагашский район";mData[4][1]="7613";mData[4][2]="240";mData[4][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="304,557,298,563,279,579,265,579,259,581,247,571,225,571,229,576,219,586,221,589,221,605,225,612,224,619,227,622,225,628,225,636,231,640,230,641,230,647,234,649,243,642,247,645,244,655,250,658,247,662,256,669,261,668,270,670,276,674,281,679,282,686,283,688,283,687,285,689,282,691,286,694,294,687,290,680,309,665,323,651,323,640,329,635,336,631,337,624,344,619,353,619,366,621,368,614,363,614,363,608,361,601,359,602,353,599,354,596,355,596,351,593,351,591,352,590,349,586,353,582,350,580,351,576,349,573,355,566,351,562,351,558,345,556,337,561,333,561,326,565,323,561,316,562,312,561,308,562,304,557" href="/view.php?id=127"  title="Сарыагашский район" alt="Сарыагашский район" onmouseover="mapShowInfo(4)" onmouseout="mapHideInfo()" />';mData[5] = new Array();mData[5][0]="Казыгуртский район";mData[5][1]="4100";mData[5][2]="95,5";mData[5][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="364,607,363,608,369,607,387,593,401,586,406,588,419,582,423,572,428,574,441,562,443,562,446,553,456,548,456,541,459,537,457,534,454,533,452,530,446,529,446,525,440,528,428,535,428,540,431,542,422,550,416,550,414,550,414,553,416,555,413,557,411,557,409,553,409,548,410,545,408,542,403,537,395,537,386,540,384,532,380,535,377,533,376,537,374,539,370,539,370,542,373,543,372,545,369,546,366,541,366,533,365,527,363,519,362,512,360,511,358,511,358,507,356,506,353,506,338,520,332,518,324,522,319,547,319,549,322,552,317,554,315,553,312,557,310,555,308,557,304,557,308,562,312,561,316,562,323,561,326,565,333,561,337,561,345,556,351,558,351,562,355,566,349,573,351,576,350,580,353,582,349,586,352,590,351,591,351,593,355,596,354,596,353,599,359,602,361,601,363,608" href="/view.php?id=128"  title="Казыгуртский район" alt="Казыгуртский район" onmouseover="mapShowInfo(5)" onmouseout="mapHideInfo()" />';mData[6] = new Array();mData[6][0]="Отрарский район";mData[6][1]="18100";mData[6][2]="54,7";mData[6][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="52,556,0,549,0,483,18,491,63,451,78,461,107,433,132,416,156,408,197,387,199,390,196,395,192,401,196,405,199,404,202,406,205,405,208,405,211,405,213,409,219,410,223,413,230,413,234,411,231,408,229,406,223,405,223,399,225,397,225,394,230,394,238,394,244,408,256,401,258,408,265,408,265,414,270,411,274,414,284,409,293,415,301,424,294,428,294,440,310,448,311,451,299,447,296,450,305,459,298,475,287,475,283,478,279,478,277,481,239,484,238,489,239,491,241,494,239,506,180,507,89,529,94,568,76,566,72,559,52,556" href="/view.php?id=120"  title="Отрарский район" alt="Отрарский район" onmouseover="mapShowInfo(6)" onmouseout="mapHideInfo()" />';mData[7] = new Array();mData[7][0]="Отрарский район";mData[7][1]="18100";mData[7][2]="54,7";mData[7][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="304,557,298,563,279,579,265,579,259,581,247,571,225,571,228,566,228,560,233,556,234,551,233,547,233,540,240,547,259,547,289,540,301,536,304,539,303,544,310,547,304,557" href="/view.php?id=120"  title="Отрарский район" alt="Отрарский район" onmouseover="mapShowInfo(7)" onmouseout="mapHideInfo()" />';mData[8] = new Array();mData[8][0]="Арысский район";mData[8][1]="0";mData[8][2]="25,1";mData[8][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="91,544,200,546,199,542,202,538,204,541,207,541,207,536,210,533,210,527,211,525,218,526,218,539,227,540,227,547,233,547,233,556,234,551,233,547,233,540,240,547,259,547,289,540,301,536,304,539,303,544,310,547,304,557,308,557,310,555,312,557,315,553,317,554,322,552,319,549,319,547,324,522,332,518,332,518,339,514,326,509,319,520,312,509,309,509,309,506,303,501,296,494,299,491,307,497,312,497,312,490,314,488,310,483,310,477,309,473,331,452,331,446,323,453,311,451,299,447,296,450,305,459,298,475,287,475,283,478,279,478,277,481,239,484,238,489,239,491,241,494,239,506,180,507,89,529" href="#"  title="Арысский район" alt="Арысский район" onmouseover="mapShowInfo(8)" onmouseout="mapHideInfo()" />';mData[9] = new Array();mData[9][0]="Ордабасынский район";mData[9][1]="2700";mData[9][2]="84,5";mData[9][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="331,452,332,455,338,449,351,448,354,453,359,450,362,446,366,446,373,440,377,445,371,452,367,457,365,461,369,464,369,469,365,472,365,474,360,479,366,487,364,495,360,495,358,507,356,506,353,506,338,520,332,518,339,514,326,509,319,520,312,509,309,509,309,506,303,501,296,494,299,491,307,497,312,497,312,490,314,488,310,483,310,477,309,473" href="/view.php?id=119"  title="Ордабасынский район" alt="Ордабасынский район" onmouseover="mapShowInfo(9)" onmouseout="mapHideInfo()" />';mData[10] = new Array();mData[10][0]="Толебийский район";mData[10][1]="3150";mData[10][2]="107";mData[10][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="460,537,461,537,466,536,470,530,475,530,479,538,486,538,492,533,494,523,502,518,501,515,503,514,509,515,523,506,515,504,510,497,505,494,503,492,503,489,499,489,486,490,479,494,474,491,462,497,460,496,454,496,448,501,441,493,433,494,429,492,423,493,423,492,420,493,418,492,413,492,413,494,422,500,426,498,430,502,423,508,416,504,414,508,411,509,407,509,405,511,403,510,389,510,389,520,387,520,385,512,384,515,384,526,385,528,384,529,380,529,377,533,380,535,384,532,386,540,395,537,403,537,408,542,410,545,409,548,409,553,411,557,413,557,416,555,414,553,414,550,416,550,422,550,431,542,428,540,428,535,440,528,446,525,446,529,452,530,454,533,457,534" href="/view.php?id=125"  title="Толебийский район" alt="Толебийский район" onmouseover="mapShowInfo(10)" onmouseout="mapHideInfo()" />';mData[11] = new Array();mData[11][0]="10";mData[11][1]="0";mData[11][2]="0";mData[11][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="389,510,388,509,385,509,385,508,379,508,378,509,375,509,374,510,370,506,367,506,367,509,358,511,360,511,362,512,363,519,365,527,366,533,366,541,369,546,372,545,373,543,370,542,370,539,374,539,376,537,377,533,380,529,384,529,385,528,384,526,384,515,385,512,387,520,389,520,389,510" href="#"  title="10" alt="10" onmouseover="mapShowInfo(11)" onmouseout="mapHideInfo()" />';mData[12] = new Array();mData[12][0]="11";mData[12][1]="0";mData[12][2]="0";mData[12][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="358,511,367,509,367,506,370,506,374,510,375,509,378,509,379,508,385,508,385,509,388,509,387,501,389,500,387,499,382,499,382,496,387,496,381,490,386,490,382,486,380,485,378,485,376,487,375,485,372,485,371,488,368,488,366,487,364,495,360,495,358,507" href="#"  title="11" alt="11" onmouseover="mapShowInfo(12)" onmouseout="mapHideInfo()" />';mData[13] = new Array();mData[13][0]="Сайрамский район";mData[13][1]="17000";mData[13][2]="241,5";mData[13][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="389,510,403,510,405,511,407,509,411,509,414,508,416,504,423,508,430,502,426,498,422,500,413,494,413,492,418,492,420,493,423,492,423,492,423,486,421,484,418,482,415,479,410,477,407,477,407,473,405,471,400,471,400,469,402,466,400,464,399,465,396,465,393,462,390,462,390,459,388,460,384,460,382,458,381,458,379,460,377,460,369,464,369,469,365,472,365,474,360,479,366,487,368,488,371,488,372,485,375,485,376,487,378,485,380,485,382,486,386,490,381,490,387,496,382,496,382,499,387,499,389,500,387,501,388,509" href="/view.php?id=123"  title="Сайрамский район" alt="Сайрамский район" onmouseover="mapShowInfo(13)" onmouseout="mapHideInfo()" />';mData[14] = new Array();mData[14][0]="Тулькубасский район";mData[14][1]="2300";mData[14][2]="88,2";mData[14][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="423,492,423,493,429,492,433,494,441,493,448,501,454,496,460,496,462,497,474,491,479,494,486,490,499,489,499,485,500,482,497,479,490,481,485,474,480,469,474,467,472,462,467,457,467,455,465,454,462,454,459,451,457,448,455,449,451,449,439,442,429,438,425,434,422,429,421,431,421,437,419,439,418,438,416,438,415,439,416,442,416,443,405,456,409,459,406,462,403,462,403,458,402,457,400,457,400,453,398,451,397,453,397,457,393,462,396,465,399,465,400,464,402,466,400,469,400,471,405,471,407,473,407,477,410,477,415,479,418,482,421,484,423,486,423,492" href="/view.php?id=122"  title="Тулькубасский район" alt="Тулькубасский район" onmouseover="mapShowInfo(14)" onmouseout="mapHideInfo()" />';mData[15] = new Array();mData[15][0]="Байдибекский район";mData[15][1]="7200";mData[15][2]="51,7";mData[15][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="393,462,390,462,390,459,388,460,384,460,382,458,381,458,379,460,377,460,369,464,365,461,367,457,371,452,377,445,373,440,366,446,362,446,359,450,354,453,351,448,338,449,332,455,331,452,331,447,331,446,333,442,330,438,324,442,320,440,321,438,315,431,320,424,320,420,319,419,322,417,318,416,301,403,298,401,292,396,291,393,291,390,292,386,295,383,297,382,301,376,301,367,303,362,309,358,309,351,306,346,312,339,313,336,318,332,322,339,332,341,337,343,347,353,349,354,351,353,358,350,365,351,369,353,367,358,369,363,373,370,378,368,379,369,379,374,385,373,387,373,397,379,398,379,399,375,402,372,404,375,404,380,412,380,417,383,420,382,423,385,423,389,421,392,427,397,431,394,434,397,432,401,430,403,436,406,438,407,435,410,439,415,439,424,438,426,439,433,441,435,441,439,439,442,429,438,425,434,422,429,421,431,421,437,419,439,418,438,416,438,415,439,416,442,416,443,405,456,409,459,406,462,403,462,403,458,402,457,400,457,400,453,398,451,397,453,397,457,393,462" href="/view.php?id=118"  title="Байдибекский район" alt="Байдибекский район" onmouseover="mapShowInfo(15)" onmouseout="mapHideInfo()" />';mData[16] = new Array();mData[16][0]="Ордабасынский район";mData[16][1]="2700";mData[16][2]="84,5";mData[16][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="310,477,309,473,331,452,331,446,323,453,311,451,310,448,294,440,294,428,301,424,293,415,293,415,301,403,318,416,322,417,319,419,320,420,320,424,315,431,321,438,320,440,324,442,330,438,333,442,331,446,331,447,331,446,331,452,309,473,310,477" href="/view.php?id=119"  title="Ордабасынский район" alt="Ордабасынский район" onmouseover="mapShowInfo(16)" onmouseout="mapHideInfo()" />';mData[17] = new Array();mData[17][0]="Туркестанcкий район";mData[17][1]="0";mData[17][2]="0";mData[17][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="317,332,316,330,314,330,312,328,309,328,309,327,306,327,305,325,308,318,306,316,297,320,293,308,280,300,263,300,261,294,253,293,246,289,235,289,233,290,231,281,228,278,226,278,220,284,216,281,213,282,205,289,208,293,208,295,211,301,211,303,210,303,210,314,206,317,197,309,195,310,195,316,196,317,196,332,187,340,187,352,186,355,181,357,176,359,178,371,183,369,183,362,185,359,187,359,186,364,191,364,192,365,191,366,191,373,193,375,193,378,195,380,201,380,201,383,196,387,199,390,196,395,192,401,196,405,199,404,202,406,205,405,208,405,211,405,213,409,219,410,223,413,230,413,234,411,231,408,229,406,223,405,223,399,225,397,225,394,230,394,238,394,244,408,256,401,258,408,265,408,265,414,270,411,274,414,284,409,292,415,292,415,301,403,298,401,292,396,291,393,291,390,292,386,295,383,297,382,301,376,301,367,303,362,309,358,309,351,306,346,312,339,313,336,318,332" href="#"  title="Туркестанcкий район" alt="Туркестанcкий район" onmouseover="mapShowInfo(17)" onmouseout="mapHideInfo()" />';mData[18] = new Array();mData[18][0]="Сузакский район";mData[18][1]="41000";mData[18][2]="50,1";mData[18][3]="0";document.getElementById('mapsMap').innerHTML += '<area shape="poly" coords="358,350,351,353,349,354,347,353,337,343,332,341,322,339,318,332,316,330,314,330,312,328,309,328,309,327,306,327,305,325,308,318,306,316,297,320,293,308,280,300,263,300,261,294,253,293,246,289,235,289,233,290,231,281,228,278,226,278,227,278,203,261,195,254,188,244,187,239,175,233,170,235,160,225,160,216,162,214,160,116,143,109,127,95,126,94,133,71,133,56,136,47,142,38,144,32,144,31,142,24,126,9,127,0,310,0,327,27,328,33,333,46,340,65,352,90,365,141,372,150,394,252,390,255,389,267,386,270,382,278,382,294,371,324,371,329,358,350" href="/view.php?id=115"  title="Сузакский район" alt="Сузакский район" onmouseover="mapShowInfo(18)" onmouseout="mapHideInfo()" />';}


		var mapTmrId;
		var mapMove = false;
		function mapOver () {
			document.getElementById('bigmap').style.right = (document.body.clientWidth-900)/2+64
			document.getElementById('bigmap').style.display = '';
			clearTimeout(mapTmrId);
		};
		
		function mapOut () {
			mapTmrId = setTimeout ("mapTimer()", 1000);
		};
		
		function mapMoveF (inout) {
			mapMove = inout;
		};
		
		function mapTimer () {
			if (!mapMove) {
				document.getElementById('bigmap').style.display = 'none';
			}
			clearTimeout(mapTmrId);
		};
		
		function ietruebody(){
			return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
		};
		
		function mapShowInfo (rId) {
			var itabl = document.getElementById('infot');
			var ttext = '<tr><td colspan="2" align="center"><b>' + mData[rId][0] + '</b></td></tr>'
			 + '<tr><td align="right" width="80">Плошадь:</td><td>' + mData[rId][1] + ' км<sup>2</sup></td></tr>'
			 + '<tr><td align="right" width="80">Население:</td><td>' + mData[rId][2] + ' тыс. чел.</td></tr>'
			 + '<tr><td align="right" width="80">ВВП:</td><td>' + mData[rId][3] + '</td></tr>';
			try {
				itabl.innerHTML=ttext;
			} catch (e) {
				itabl.outerHTML='<table border="1" style="background-color: #77bde0;" cellpadding="0" cellspacing="0" width="250" id="infot">' + ttext + '</table>';
			}
			document.getElementById('mhelp').style.display='';
		};
		
		function mapMoveInfo (cursor) {
			var mhobj = document.getElementById('mhelp');
			if(!cursor) var cursor = window.event;
			if (cursor.pageX || cursor.pageY) {
				xpos = cursor.pageX;
				ypos = cursor.pageY;
				
			} else if (cursor.clientX || cursor.clientY) {
				xpos = cursor.clientX + ietruebody().scrollLeft;
				ypos = cursor.clientY + ietruebody().scrollTop;
			}
			mhobj.style.top=ypos+3+"px";
			mhobj.style.left=xpos+3+"px";
		};
		
		function mapHideInfo () {
			var itabl = document.getElementById('infot');
			var ttext = "<tr><td align=\"justify\">Для отображения информации о районе наведите на него курсор.</td></tr>";
			try {
				itabl.innerHTML=ttext;
			} catch (e) {
				itabl.outerHTML='<table border="1" style="background-color: #77bde0;" cellpadding="0" cellspacing="0" width="250" id="infot">' + ttext + '</table>';
			}
			document.getElementById('mhelp').style.display='none';
		};

		
var user = null;
var usId = 0;var usLogin = 1; var usAccess = 2; var usSession = 3; 
var isLoaded = 0;
function Loader(){
	isLoaded = 1;
	loadUser();
	var i = getCookie('XANav');
	if (typeof(i) != "undefined") {
		doOpennav(i);
	}
	try  {
		onLoaded();
	} catch(e) {}
}


function DrawLogin(unregistered, registered)
{	
	loadUser();

	if (user == null) {
		document.write('<div class="login"><a href="/user.php">'+unregistered+'</a></div>');
	}
	else {
		var user_str = '<a href="/user.php">'+user[usLogin]+'</a>';
		document.write('<div class="login">' + registered.replace('[user]', user_str) + '</div>');
	}
}

function loadUser(){ 
	var pre;
	if (getCookie('RUXA_sid') != null) {
		pre = 'RUXA';
	}
	else if(getCookie('KZXA_sid') != null) {
		pre = 'KZXA';
	}
	else if(getCookie('KZXA_sid') != null){
		pre = 'ENXA';
	}
	else {
		pre = '';
	}
	if (getCookie(pre+'_sid') != null){
		user = new Array();
		user[usId] = getCookie(pre+'_id');
		user[usLogin] = getCookie(pre+'_login');
		if (getCookie(pre+'_access') != null)
		user[usAccess] = getCookie(pre+'_access').split(',');
		user[usSession]  = getCookie(pre+'_sid'); 
	}
}


function UserHasAccess(access) {
	if (user == null) return false;
	for (i in user[usAccess]) {
		if (user[usAccess][i] == access || user[usAccess][i] == 'root') {
			return true;
		}		
	}		
	return false;
}


function doOpennav(id)  {
	var i;
	var obj;
	for (i=1;i<=6; i++) {
		obj = document.getElementById('menu' + i);

		if (typeof(obj) 	== 'null') {
			return;
		}
		
		if (i == id) {
			//obj.style.display = '';
		}
		else {
			//obj.style.display = 'none';
		}
	}

}

function setMemo(i) {
	SetCookie('XANav', i);
}



function SetCookie(name,value) {
var last = '0, 02-03-2010 00:00:00 GMT'
document.cookie = name + '=' + escape(value) + '; path=/; expires=' + last;
}

function getCookie(Name) {
var find = Name + '='
if (document.cookie.length > 0)
{
  offset = document.cookie.indexOf(find)
  if (offset != -1) {
   offset += find.length
   end = document.cookie.indexOf(';', offset)
   if (end == -1) end = document.cookie.length
   return unescape(document.cookie.substring(offset, end))
  }
}
}
		
		
		
(function($) {

    $.fn.innerfade = function(options) {
        return this.each(function() {   
            $.innerfade(this, options);
        });
    };

    $.innerfade = function(container, options) {
        var settings = {
        		'animationtype':    'fade',
            'speed':            'normal',
            'type':             'sequence',
            'timeout':          2000,
            'containerheight':  'auto',
            'runningclass':     'innerfade',
            'children':         null
        };
        if (options)
            $.extend(settings, options);
        if (settings.children === null)
            var elements = $(container).children();
        else
            var elements = $(container).children(settings.children);
        if (elements.length > 1) {
            $(container).css('position', 'relative').css('height', settings.containerheight).addClass(settings.runningclass);
            for (var i = 0; i < elements.length; i++) {
                $(elements[i]).css('z-index', String(elements.length-i)).css('position', 'absolute').hide();
            };
            if (settings.type == "sequence") {
                setTimeout(function() {
                    $.innerfade.next(elements, settings, 1, 0);
                }, settings.timeout);
                $(elements[0]).show();
            } else if (settings.type == "random") {
            		var last = Math.floor ( Math.random () * ( elements.length ) );
                setTimeout(function() {
                    do { 
												current = Math.floor ( Math.random ( ) * ( elements.length ) );
										} while (last == current );             
										$.innerfade.next(elements, settings, current, last);
                }, settings.timeout);
                $(elements[last]).show();
						} else if ( settings.type == 'random_start' ) {
								settings.type = 'sequence';
								var current = Math.floor ( Math.random () * ( elements.length ) );
								setTimeout(function(){
									$.innerfade.next(elements, settings, (current + 1) %  elements.length, current);
								}, settings.timeout);
								$(elements[current]).show();
						}	else {
							alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');
						}
				}
    };

    $.innerfade.next = function(elements, settings, current, last) {
        if (settings.animationtype == 'slide') {
            $(elements[last]).slideUp(settings.speed);
            $(elements[current]).slideDown(settings.speed);
        } else if (settings.animationtype == 'fade') {
            $(elements[last]).fadeOut(settings.speed);
            $(elements[current]).fadeIn(settings.speed, function() {
							removeFilter($(this)[0]);
						});
        } else
            alert('Innerfade-animationtype must either be \'slide\' or \'fade\'');
        if (settings.type == "sequence") {
            if ((current + 1) < elements.length) {
                current = current + 1;
                last = current - 1;
            } else {
                current = 0;
                last = elements.length - 1;
            }
        } else if (settings.type == "random") {
            last = current;
            while (current == last)
                current = Math.floor(Math.random() * elements.length);
        } else
            alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');
        setTimeout((function() {
            $.innerfade.next(elements, settings, current, last);
        }), settings.timeout);
    };

})(jQuery);

// **** remove Opacity-Filter in ie ****
function removeFilter(element) {
	if(element.style.removeAttribute){
		element.style.removeAttribute('filter');
	}
}



var scrolltotop={
	//startline: Integer. Number of pixels from top of doc scrollbar is scrolled before showing control
	//scrollto: Keyword (Integer, or "Scroll_to_Element_ID"). How far to scroll document up when control is clicked on (0=top).
	setting: {startline:600, scrollto: 0, scrollduration:1000, fadeduration:[500, 100]},
	controlattrs: {offsetx:5, offsety:5}, //offset of control relative to right/ bottom of window corner
	anchorkeyword: '#top', //Enter href value of HTML anchors on the page that should also act as "Scroll Up" links

	state: {isvisible:false, shouldvisible:false},

	scrollup:function(){
		if (!this.cssfixedsupport) //if control is positioned using JavaScript
			this.$control.css({opacity:0}) //hide control immediately after clicking it
		var dest=isNaN(this.setting.scrollto)? this.setting.scrollto : parseInt(this.setting.scrollto)
		if (typeof dest=="string" && jQuery('#'+dest).length==1) //check element set by string exists
			dest=jQuery('#'+dest).offset().top
		else
			dest=0
		this.$body.animate({scrollTop: dest}, this.setting.scrollduration);
	},

	keepfixed:function(){
		var $window=jQuery(window)
		var controlx=$window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetx
		var controly=$window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsety
		this.$control.css({left:controlx+'px', top:controly+'px'})
	},

	togglecontrol:function(){
		var scrolltop=jQuery(window).scrollTop()
		if (!this.cssfixedsupport)
			this.keepfixed()
		this.state.shouldvisible=(scrolltop>=this.setting.startline)? true : false
		if (this.state.shouldvisible && !this.state.isvisible){
			this.$control.stop().animate({opacity:1}, this.setting.fadeduration[0])
			this.state.isvisible=true
		}
		else if (this.state.shouldvisible==false && this.state.isvisible){
			this.$control.stop().animate({opacity:0}, this.setting.fadeduration[1])
			this.state.isvisible=false
		}
	},
	
	init:function(){
		jQuery(document).ready(function($){
			var mainobj=scrolltotop
			var iebrws=document.all
			mainobj.cssfixedsupport=!iebrws || iebrws && document.compatMode=="CSS1Compat" && window.XMLHttpRequest //not IE or IE7+ browsers in standards mode
			mainobj.$body=(window.opera)? (document.compatMode=="CSS1Compat"? $('html') : $('body')) : $('html,body')
			mainobj.$control=$('<div id="topcontrol">'+mainobj.controlHTML+'</div>')
				.css({position:mainobj.cssfixedsupport? 'fixed' : 'absolute', bottom:mainobj.controlattrs.offsety, right:mainobj.controlattrs.offsetx, opacity:0, cursor:'pointer'})
				.attr({title:''})
				.click(function(){mainobj.scrollup(); return false})
				.appendTo('body')
			if (document.all && !window.XMLHttpRequest && mainobj.$control.text()!='') //loose check for IE6 and below, plus whether control contains any text
				mainobj.$control.css({width:mainobj.$control.width()}) //IE6- seems to require an explicit width on a DIV containing text
			mainobj.togglecontrol()
			$('a[href="' + mainobj.anchorkeyword +'"]').click(function(){
				mainobj.scrollup()
				return false
			})
			$(window).bind('scroll resize', function(e){
				mainobj.togglecontrol()
			})
		})
	}
}

		