// onMouseOver="toolTip('tool tip text here')";
// onMouseOut="toolTip()";
// -or-
// onMouseOver="toolTip('more good stuff', '#FFFF00', 'orange')";
// onMouseOut="toolTip()"; 

var cgi_path = "/cgi-bin/";

var ns4 = document.layers;
var ie5 = document.getElementById;
var ie4 = document.all && !ie5;  // Narrowing down to IE4 (IE5 supports document.all also).
var ns6 = ie5 && !document.all;  

var passed_global = false;
var loaded_script_was_executed = false;

offsetX = 20;
offsetY = 20;

var browserType  = "none";
var toolTipSTYLE = "";
var menuSTYLE = new Array(9);

var tot_num = 0;  // Total number of search result strings
var hto     = 0;  // Companies
var skoko   = 10; // Records per page
var skuda   = 1;  // Current record, starting from 1
var shukaj  = ""; // Current search 

var num_pages = parseInt( tot_num / skoko );

if ( tot_num % skoko )
    num_pages += parseInt( ( tot_num - num_pages*skoko ) / ( tot_num % skoko ) );

var cur_page  = parseInt( skuda / skoko ) + 1;

var qs  = "";
var nv  = "";
var url = new Object();

var Tables = new Array();

var sid_global = "0";

var SeID = url.sid;
var init_crc  = 0;
var crc       = 0;

var eng_tip = new Array(
/* 0 */                 "No comments.",
/* 1 Other... */        "Temporary unavailable.",
/* 2 Turn Off */        "Click here to turn tooltips off.  To turn them on again just choose any language from the menu.",
/* 3 Member line */     "Member account information",
/* 4 ID */              "User-Member account ID",
/* 5 Verify Pwd */      "Enter your password again",
/* 6 Member Scr. Name */"User-Member nickname",
/* 7 Status */          "Member status",
/* 8 Grp Mmbrshp */     "Temporary unavailable",
/* 9 Cmp/Team line */   "Company/Team information",
/* 10 Cmp Short Nm */   "Brand name, abbreviation, DBA, etc.",
/* 11 Cmp Full Nm */    "Company/Team full name",
/* 12 Legal Status */   "", /* Russian translation only */
/* 13 Company */        "Company, corporation, firm etc.",
/* 14 Perm. Team */     "Permanent team, group, department etc. inside a company",
/* 15 Freelance Team */ "Temporary team",
/* 16 Parent Cmp */     "Highly recommended for permanent team",
/* 17 Headline */       "Short description of your company/team (here may be keywords for quick search)",
/* 18 Mission Stmnt */  "Company/team mission statement (e.g., \"Technical people work together\")",
/* 19 Contact Info */   "Company/team contact information",
/* 20 Contact Me */     "Select a way other users can contact you",
/* 21 Cmp/Team type */  "", /* Russian translation only */
/* 22 Cmp/Team cat */   "Right now, only Software Special Features Form is available",
/* 23 Est./found in */  "Day and Month are not mandatory",
/* 24 Size */           "Company/team size",
/* 25 Ownership */      "Only for a company",
/* 26 Mrkt region */    "", /* Russian translation only */
/* 27 Certification */  "Company/team certification",
/* 28 Rel.experience */ "", /* Russian translation only */
/* 29 Complete Prjs */  "Portfolio and references",
/* 30 Education */      "", /* Russian translation only */
/* 31 Scnd Lang. */     "", /* Russian translation only */
/* 32 Comps&Other eq */ "", /* Russian translation only */
/* 33 Software Tools */ "", /* Russian translation only */
/* 34 Other Refs */     "", /* Russian translation only */
/* 35 Other Portfs */   "", /* Russian translation only */
/* 36 Summary */        "Additional description of your company/team",
/* 37 Posted by */      "", /* Russian translation only */
/* 38 Recomm. by */     "Referred by", /* Russian translation only */
/* Company/Team Type ------------------------- */
/* 39 Prj Ownr HT fld */"Product/Project maker/developer",
/* 40 Prj Ownr Oth    */"", /* Russian translation only */
/* 41 Provider - Dev */ "HT outsourcing provider/contractor",
/* SPECIALIST */
/* 42 Spec. Info */     "Specialist information",
/* 43 Headline */       "Short description of your specialties (here may be keywords for quick search)",
/* 44 Motto */          "Your motto/slogan  (e.g., \"Technical people work together\")",
/* 45 Contact Info */   "Your contact information",
/* 46 Type */           "",
/* 47 Category */       "Right now, only Software Special Features Form is available",
/* 48 Birthday */       "",
/* 49 Certificate */    "Your professional certifications (additional to ones indicated in Special Features Form and Education)",
/* 50 Relevant Exp. */  "",
/* 51 Work */           "Portfolio and references",
/* 52 Education */      "",
/* 53 Sec. lang. */     "To clear mistakenly clicked radio-button choose '--Select--' from list of languages",
/* 54 Oth. portf. */    "",
/* 55 Resume */         "Additional description of your skills",
/* 56 Proj Owner */     "",
/* 57 Developer */      "HT - outsourcing provider/contractor/freelancer/telecommuter or looking for a job position (employment)",
/* 58 Tester/QA */      "HT - tester/QA or looking for a job position (employment)",
/* 59 Intermediary */   ""
);

var rus_tip = new Array(
/* 0 */"&#1055;&#1086;&#1078;&#1072;&#1083;&#1091;&#1081;&#1089;&#1090;&#1072;,&nbsp;&#1079;&#1072;&#1087;&#1086;&#1083;&#1085;&#1080;&#1090;&#1077;&nbsp;&#1092;&#1086;&#1088;&#1084;&#1091;&nbsp;(&#1087;&#1086;&#1083;&#1103;&nbsp;&#1089;&#1086;&nbsp;&#1079;&#1074;&#1077;&#1079;&#1076;&#1086;&#1095;&#1082;&#1086;&#1081;&nbsp;-&nbsp;&#1086;&#1073;&#1103;&#1079;&#1072;&#1090;&#1077;&#1083;&#1100;&#1085;&#1099;)&nbsp;&#1080;&nbsp;&#1085;&#1072;&#1078;&#1084;&#1080;&#1090;&#1077;&nbsp;&#1082;&#1085;&#1086;&#1087;&#1082;&#1091;&nbsp;&quot;Post&quot;.<br/>ID &#1080; Password &#1076;&#1086;&#1083;&#1078;&#1085;&#1099; &#1089;&#1086;&#1089;&#1090;&#1086;&#1103;&#1090;&#1100; &#1080;&#1079; 6-16 &#1089;&#1080;&#1084;&#1074;&#1086;&#1083;&#1086;&#1074; &#1072;&#1085;&#1075;&#1083;&#1080;&#1081;&#1089;&#1082;&#1086;&#1075;&#1086; &#1072;&#1083;&#1092;&#1072;&#1074;&#1080;&#1090;&#1072; &#1080;&#1083;&#1080; &#1094;&#1080;&#1092;&#1088;, &#1084;&#1086;&#1075;&#1091;&#1090; &#1089;&#1086;&#1076;&#1077;&#1088;&#1078;&#1072;&#1090;&#1100; &#1089;&#1080;&#1084;&#1074;&#1086;&#1083; &#1087;&#1086;&#1076;&#1095;&#1077;&#1088;&#1082;&#1080;&#1074;&#1072;&#1085;&#1080;&#1103; (_), &#1085;&#1086; &#1085;&#1077; &#1084;&#1086;&#1075;&#1091;&#1090; &#1085;&#1072;&#1095;&#1080;&#1085;&#1072;&#1090;&#1100;&#1089;&#1103; &#1089; &#1085;&#1077;&#1075;&#1086;.<br/>ID - &#1088;&#1077;&#1075;&#1080;&#1089;&#1090;&#1088;&#1086;&#1085;&#1077;&#1079;&#1072;&#1074;&#1080;&#1089;&#1080;&#1084;&#1086;&#1077; &#1087;&#1086;&#1083;&#1077; (aBC == Abc), Password - &#1088;&#1077;&#1075;&#1080;&#1089;&#1090;&#1088;&#1086;&#1079;&#1072;&#1074;&#1080;&#1089;&#1080;&#1084;&#1086;&#1077;. &#1054;&#1073;&#1072; &#1087;&#1086;&#1083;&#1103; &#1053;&#1045; &#1052;&#1054;&#1043;&#1059;&#1058; &#1085;&#1072;&#1095;&#1080;&#1085;&#1072;&#1090;&#1100;&#1089;&#1103; &#1089; &#1089;&#1080;&#1084;&#1074;&#1086;&#1083;&#1072; &#1087;&#1086;&#1076;&#1095;&#1077;&#1088;&#1082;&#1080;&#1074;&#1072;&#1085;&#1080;&#1103;.",
/* 1 Other... */"&#1042;&#1088;&#1077;&#1084;&#1077;&#1085;&#1085;&#1086; &#1085;&#1077;&#1076;&#1086;&#1089;&#1090;&#1091;&#1087;&#1085;&#1086;.",
/* 2 Turn Off */"&#1053;&#1072;&#1078;&#1084;&#1080;&#1090;&#1077; &#1079;&#1076;&#1077;&#1089;&#1100;, &#1095;&#1090;&#1086;&#1073;&#1099; &#1074;&#1099;&#1082;&#1083;&#1102;&#1095;&#1080;&#1090;&#1100; &#1088;&#1077;&#1078;&#1080;&#1084; &#1087;&#1086;&#1076;&#1089;&#1082;&#1072;&#1079;&#1082;&#1080;. &#1044;&#1083;&#1103; &#1087;&#1086;&#1074;&#1090;&#1086;&#1088;&#1085;&#1086;&#1075;&#1086; &#1074;&#1082;&#1083;&#1102;&#1095;&#1077;&#1085;&#1080;&#1103; - &#1074;&#1099;&#1073;&#1077;&#1088;&#1080;&#1090;&#1077; &#1083;&#1102;&#1073;&#1086;&#1081; &#1103;&#1079;&#1099;&#1082; &#1080;&#1079; &#1084;&#1077;&#1085;&#1102;.",
/* 3 Member line */     "&#1057;&#1087;&#1077;&#1094;&#1080;&#1072;&#1083;&#1100;&#1085;&#1072;&#1103; &#1080;&#1085;&#1092;&#1086;&#1088;&#1084;&#1072;&#1094;&#1080;&#1103; &#1086;&#1073; &#1091;&#1095;&#1072;&#1089;&#1090;&#1085;&#1080;&#1082;&#1077;",
/* 4 ID */              "&#1056;&#1077;&#1075;&#1080;&#1089;&#1090;&#1088;&#1072;&#1094;&#1080;&#1086;&#1085;&#1085;&#1099;&#1081; &#1080;&#1076;&#1077;&#1085;&#1090;&#1080;&#1092;&#1080;&#1082;&#1072;&#1090;&#1086;&#1088; &#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1103;-&#1091;&#1095;&#1072;&#1089;&#1090;&#1085;&#1080;&#1082;&#1072;",
/* 5 Verify Pwd */      "&#1042;&#1074;&#1077;&#1076;&#1080;&#1090;&#1077; &#1089;&#1074;&#1086;&#1081; &#1087;&#1072;&#1088;&#1086;&#1083;&#1100; &#1087;&#1086;&#1074;&#1090;&#1086;&#1088;&#1085;&#1086;",
/* 6 Member Scr. Name */"&#1048;&#1084;&#1103; &#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1103;- &#1091;&#1095;&#1072;&#1089;&#1090;&#1085;&#1080;&#1082;&#1072; &#1085;&#1072; &#1101;&#1082;&#1088;&#1072;&#1085;&#1077;",
/* 7 Status */          "&#1057;&#1090;&#1072;&#1090;&#1091;&#1089; &#1091;&#1095;&#1072;&#1089;&#1090;&#1085;&#1080;&#1082;&#1072;",
/* 8 Grp Mmbrshp */     "&#1050;&#1086;&#1083;&#1083;&#1077;&#1082;&#1090;&#1080;&#1074;&#1085;&#1086;&#1077; &#1095;&#1083;&#1077;&#1085;&#1089;&#1090;&#1074;&#1086; (&#1074;&#1088;&#1077;&#1084;&#1077;&#1085;&#1085;&#1086; &#1085;&#1077; &#1088;&#1077;&#1072;&#1083;&#1080;&#1079;&#1086;&#1074;&#1072;&#1085;&#1086;)",
/* 9 Cmp/Team line */   "&#1048;&#1085;&#1092;&#1086;&#1088;&#1084;&#1072;&#1094;&#1080;&#1103; &#1086; &#1082;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1080;/&#1075;&#1088;&#1091;&#1087;&#1087;&#1077;",
/* 10 Cmp Short Nm */   "&#1050;&#1088;&#1072;&#1090;&#1082;&#1086;&#1077; &#1080;&#1084;&#1103; &#1082;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1080;/&#1075;&#1088;&#1091;&#1087;&#1087;&#1099;",
/* 11 Cmp Full Nm */    "&#1055;&#1086;&#1083;&#1085;&#1086;&#1077; &#1080;&#1084;&#1103; &#1082;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1080;/&#1075;&#1088;&#1091;&#1087;&#1087;&#1099;",
/* 12 Legal Status */   "&#1070;&#1088;&#1080;&#1076;&#1080;&#1095;&#1077;&#1089;&#1082;&#1080;&#1081; &#1089;&#1090;&#1072;&#1090;&#1091;&#1089;", /* Russian translation only */
/* 13 Company */        "&#1070;&#1088;&#1080;&#1076;&#1080;&#1095;&#1077;&#1089;&#1082;&#1086;&#1077; &#1083;&#1080;&#1094;&#1086;",
/* 14 Perm. Team */     "&#1055;&#1086;&#1089;&#1090;&#1086;&#1103;&#1085;&#1085;&#1072;&#1103; &#1075;&#1088;&#1091;&#1087;&#1087;&#1072;/&#1087;&#1086;&#1076;&#1088;&#1072;&#1079;&#1076;&#1077;&#1083;&#1077;&#1085;&#1080;&#1077; (&#1085;&#1077; &#1102;&#1088;&#1080;&#1076;&#1080;&#1095;&#1077;&#1089;&#1082;&#1086;&#1077; &#1083;&#1080;&#1094;&#1086;) &#1074;&#1085;&#1091;&#1090;&#1088;&#1080; &#1082;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1080;",
/* 15 Freelance Team */ "&#1042;&#1088;&#1077;&#1084;&#1077;&#1085;&#1085;&#1072;&#1103;/&#1088;&#1072;&#1073;&#1086;&#1095;&#1072;&#1103; &#1075;&#1088;&#1091;&#1087;&#1087;&#1072; &#1089;&#1087;&#1077;&#1094;&#1080;&#1072;&#1083;&#1080;&#1089;&#1090;&#1086;&#1074;",
/* 16 Parent Cmp */     "&#1057;&#1086;&#1082;&#1088;&#1072;&#1097;&#1105;&#1085;&#1085;&#1086;&#1077; &#1080;&#1084;&#1103; &#1086;&#1073;&#1098;&#1077;&#1076;&#1080;&#1085;&#1077;&#1085;&#1080;&#1103;/&#1075;&#1086;&#1083;&#1086;&#1074;&#1085;&#1086;&#1075;&#1086; &#1087;&#1088;&#1077;&#1076;&#1087;&#1088;&#1080;&#1103;&#1090;&#1080;&#1103;/&#1082;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1080; (&#1086;&#1095;&#1077;&#1085;&#1100; &#1088;&#1077;&#1082;&#1086;&#1084;&#1077;&#1085;&#1076;&#1091;&#1077;&#1090;&#1089;&#1103; &#1076;&#1083;&#1103; &#1055;&#1086;&#1089;&#1090;&#1086;&#1103;&#1085;&#1085;&#1099;&#1093; &#1043;&#1088;&#1091;&#1087;&#1087;)",
/* 17 Headline */       "&#1050;&#1088;&#1072;&#1090;&#1082;&#1086;&#1077; &#1086;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1077;, &#1093;&#1072;&#1088;&#1072;&#1082;&#1090;&#1077;&#1088;&#1080;&#1079;&#1091;&#1102;&#1097;&#1077;&#1077; &#1042;&#1072;&#1096;&#1091; &#1082;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1102;/&#1075;&#1088;&#1091;&#1087;&#1087;&#1091; (&#1084;&#1086;&#1078;&#1085;&#1086; &#1086;&#1075;&#1088;&#1072;&#1085;&#1080;&#1095;&#1080;&#1090;&#1100;&#1089;&#1103; &#1082;&#1083;&#1102;&#1095;&#1077;&#1074;&#1099;&#1084;&#1080; &#1089;&#1083;&#1086;&#1074;&#1072;&#1084;&#1080; &#1076;&#1083;&#1103; &#1073;&#1086;&#1083;&#1077;&#1077; &#1101;&#1092;&#1092;&#1077;&#1082;&#1090;&#1080;&#1074;&#1085;&#1086;&#1075;&#1086; &#1073;&#1099;&#1089;&#1090;&#1088;&#1086;&#1075;&#1086; &#1087;&#1086;&#1080;&#1089;&#1082;&#1072;)",
/* 18 Mission Stmnt */  "&#1057;&#1083;&#1086;&#1075;&#1072;&#1085; &#1082;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1080;/&#1075;&#1088;&#1091;&#1087;&#1087;&#1099; (&#1085;&#1072;&#1087;&#1088;&#1080;&#1084;&#1077;&#1088;, &ldquo;&#1057;&#1087;&#1077;&#1094;&#1080;&#1072;&#1083;&#1080;&#1089;&#1090;&#1099; &#1074;&#1089;&#1077;&#1093; &#1089;&#1090;&#1088;&#1072;&#1085; - &#1089;&#1086;&#1077;&#1076;&#1080;&#1085;&#1103;&#1081;&#1090;&#1077;&#1089;&#1100;!&rdquo; :-)",
/* 19 Contact Info */   "&#1050;&#1086;&#1085;&#1090;&#1072;&#1082;&#1090;&#1085;&#1072;&#1103; &#1080;&#1085;&#1092;&#1086;&#1088;&#1084;&#1072;&#1094;&#1080;&#1103; &#1082;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1080;/&#1075;&#1088;&#1091;&#1087;&#1087;&#1099;",
/* 20 Contact Me */     "&#1054;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1080;&#1090;&#1077;, &#1082;&#1072;&#1082; &#1076;&#1088;&#1091;&#1075;&#1080;&#1077; &#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1080; &#1084;&#1086;&#1075;&#1091;&#1090; &#1086;&#1073;&#1097;&#1072;&#1090;&#1100;&#1089;&#1103; &#1089; &#1042;&#1072;&#1084;&#1080;",
/* 21 Cmp/Team type */  "&#1045;&#1089;&#1083;&#1080; &#1042;&#1072;&#1096;&#1072; &#1050;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1103;/&#1043;&#1088;&#1091;&#1087;&#1087;&#1072; &#1086;&#1090;&#1085;&#1086;&#1089;&#1080;&#1090;&#1089;&#1103; &#1082; Support Service Provider (&#1080;&#1089;&#1087;&#1086;&#1083;&#1085;&#1080;&#1090;&#1077;&#1083;&#1100;/&#1082;&#1086;&#1085;&#1090;&#1088;&#1072;&#1082;&#1090;&#1086;&#1088; &#1074; &#1086;&#1073;&#1083;&#1072;&#1089;&#1090;&#1080; &#1086;&#1073;&#1077;&#1089;&#1087;&#1077;&#1095;&#1080;&#1074;&#1072;&#1102;&#1097;&#1080;&#1093;/&#1074;&#1089;&#1087;&#1086;&#1084;&#1086;&#1075;&#1072;&#1090;&#1077;&#1083;&#1100;&#1085;&#1099;&#1093; &#1088;&#1072;&#1073;&#1086;&#1090;), &#1088;&#1077;&#1082;&#1086;&#1084;&#1077;&#1085;&#1076;&#1091;&#1077;&#1084; &#1097;&#1105;&#1083;&#1082;&#1085;&#1091;&#1090;&#1100; &#1089;&#1086;&#1086;&#1090;&#1074;&#1077;&#1090;&#1089;&#1090;&#1074;&#1091;&#1102;&#1097;&#1091;&#1102; &#1089;&#1089;&#1099;&#1083;&#1082;&#1091; &#1085;&#1080;&#1078;&#1077; &#1076;&#1083;&#1103; &#1074;&#1074;&#1086;&#1076;&#1072; &#1091;&#1090;&#1086;&#1095;&#1085;&#1103;&#1102;&#1097;&#1077;&#1081; &#1080;&#1085;&#1092;&#1086;&#1088;&#1084;&#1072;&#1094;&#1080;&#1080;. &#1063;&#1090;&#1086;&#1073;&#1099; &#1089;&#1087;&#1088;&#1103;&#1090;&#1072;&#1090;&#1100; &#1076;&#1086;&#1087;&#1086;&#1083;&#1085;&#1080;&#1090;&#1077;&#1083;&#1100;&#1085;&#1091;&#1102; &#1092;&#1086;&#1088;&#1084;&#1091;, &#1097;&#1105;&#1083;&#1082;&#1085;&#1080;&#1090;&#1077; &#1089;&#1089;&#1099;&#1083;&#1082;&#1091; &#1087;&#1086;&#1074;&#1090;&#1086;&#1088;&#1085;&#1086;", /* Russian translation only */
/* 22 Cmp/Team cat */   "&#1045;&#1089;&#1083;&#1080; &#1042;&#1072;&#1096;&#1072; &#1050;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1103;/&#1043;&#1088;&#1091;&#1087;&#1087;&#1072; &#1088;&#1072;&#1073;&#1086;&#1090;&#1072;&#1077;&#1090; &#1074; &#1053;igh &#1058;ech - &#1086;&#1090;&#1088;&#1072;&#1089;&#1083;&#1080;, &#1088;&#1077;&#1082;&#1086;&#1084;&#1077;&#1085;&#1076;&#1091;&#1077;&#1084; &#1097;&#1105;&#1083;&#1082;&#1085;&#1091;&#1090;&#1100; &#1089;&#1086;&#1086;&#1090;&#1074;&#1077;&#1090;&#1089;&#1090;&#1074;&#1091;&#1102;&#1097;&#1091;&#1102; &#1089;&#1089;&#1099;&#1083;&#1082;&#1091; &#1085;&#1080;&#1078;&#1077; &#1076;&#1083;&#1103; &#1074;&#1074;&#1086;&#1076;&#1072; &#1091;&#1090;&#1086;&#1095;&#1085;&#1103;&#1102;&#1097;&#1077;&#1081; &#1080;&#1085;&#1092;&#1086;&#1088;&#1084;&#1072;&#1094;&#1080;&#1080;. &#1063;&#1090;&#1086;&#1073;&#1099; &#1089;&#1087;&#1088;&#1103;&#1090;&#1072;&#1090;&#1100; &#1076;&#1086;&#1087;&#1086;&#1083;&#1085;&#1080;&#1090;&#1077;&#1083;&#1100;&#1085;&#1091;&#1102; &#1092;&#1086;&#1088;&#1084;&#1091;, &#1097;&#1105;&#1083;&#1082;&#1085;&#1080;&#1090;&#1077; &#1089;&#1089;&#1099;&#1083;&#1082;&#1091; &#1087;&#1086;&#1074;&#1090;&#1086;&#1088;&#1085;&#1086;. &#1042; &#1101;&#1090;&#1086;&#1081; &#1074;&#1077;&#1088;&#1089;&#1080;&#1080; &#1088;&#1077;&#1072;&#1083;&#1080;&#1079;&#1086;&#1074;&#1072;&#1085;&#1072; &#1090;&#1086;&#1083;&#1100;&#1082;&#1086; Software Special Features Form",
/* 23 Est./found in */  "&#1044;&#1072;&#1090;&#1072; &#1086;&#1089;&#1085;&#1086;&#1074;&#1072;&#1085;&#1080;&#1103; &#1082;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1080;/&#1075;&#1088;&#1091;&#1087;&#1087;&#1099; (&#1076;&#1077;&#1085;&#1100; &#1080; &#1084;&#1077;&#1089;&#1103;&#1094; &#1091;&#1082;&#1072;&#1079;&#1099;&#1074;&#1072;&#1090;&#1100; &#1085;&#1077; &#1086;&#1073;&#1103;&#1079;&#1072;&#1090;&#1077;&#1083;&#1100;&#1085;&#1086;)",
/* 24 Size */           "&#1056;&#1072;&#1079;&#1084;&#1077;&#1088; &#1082;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1080; (&#1082;&#1086;&#1083;&#1080;&#1095;&#1077;&#1089;&#1090;&#1074;&#1086; &#1089;&#1086;&#1090;&#1088;&#1091;&#1076;&#1085;&#1080;&#1082;&#1086;&#1074;)",
/* 25 Ownership */      "&#1060;&#1086;&#1088;&#1084;&#1072; &#1089;&#1086;&#1073;&#1089;&#1090;&#1074;&#1077;&#1085;&#1085;&#1086;&#1089;&#1090;&#1080; (&#1090;&#1086;&#1083;&#1100;&#1082;&#1086; &#1076;&#1083;&#1103; &#1082;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1080;)",
/* 26 Mrkt region */    "&#1056;&#1077;&#1075;&#1080;&#1086;&#1085;&nbsp;&#1076;&#1077;&#1103;&#1090;&#1077;&#1083;&#1100;&#1085;&#1086;&#1089;&#1090;&#1080;", /* Russian translation only */
/* 27 Certification */  "&#1057;&#1077;&#1088;&#1090;&#1080;&#1092;&#1080;&#1082;&#1072;&#1094;&#1080;&#1103; &#1082;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1080;/&#1075;&#1088;&#1091;&#1087;&#1087;&#1099;",
/* 28 Rel.experience */ "&#1054;&#1087;&#1099;&#1090; &#1088;&#1072;&#1073;&#1086;&#1090;&#1099; &#1082;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1080;/&#1075;&#1088;&#1091;&#1087;&#1087;&#1099; &#1074; &#1091;&#1082;&#1072;&#1079;&#1072;&#1085;&#1085;&#1086;&#1081; &#1086;&#1073;&#1083;&#1072;&#1089;&#1090;&#1080;/&#1086;&#1090;&#1088;&#1072;&#1089;&#1083;&#1080; (&#1085;&#1072;&#1093;&#1086;&#1076;&#1080;&#1090;&#1089;&#1103; &#1085;&#1072; &#1085;&#1072;&#1095;&#1072;&#1083;&#1100;&#1085;&#1086;&#1081; &#1089;&#1090;&#1072;&#1076;&#1080;&#1080;, &#1080;&#1084;&#1077;&#1077;&#1090; &#1086;&#1087;&#1099;&#1090; &#1089;&#1090;&#1072;&#1073;&#1080;&#1083;&#1100;&#1085;&#1086;&#1081; &#1088;&#1072;&#1073;&#1086;&#1090;&#1099;, &#1080;&#1085;&#1090;&#1077;&#1085;&#1089;&#1080;&#1074;&#1085;&#1086; &#1088;&#1072;&#1079;&#1074;&#1080;&#1074;&#1072;&#1077;&#1090;&#1089;&#1103;)", /* Russian translation only */
/* 29 Complete Prjs */  "&#1047;&#1072;&#1074;&#1077;&#1088;&#1096;&#1105;&#1085;&#1085;&#1099;&#1077; &#1087;&#1088;&#1086;&#1077;&#1082;&#1090;&#1099; (&#1087;&#1086;&#1088;&#1090;&#1092;&#1077;&#1083;&#1100; &#1080; &#1088;&#1077;&#1082;&#1086;&#1084;&#1077;&#1085;&#1076;&#1072;&#1094;&#1080;&#1080;)",
/* 30 Education */      "&#1054;&#1073;&#1088;&#1072;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1100;&#1085;&#1099;&#1081; &#1091;&#1088;&#1086;&#1074;&#1077;&#1085;&#1100; (&#1082;&#1086;&#1083;&#1080;&#1095;&#1077;&#1089;&#1090;&#1074;&#1086; &#1089;&#1087;&#1077;&#1094;&#1080;&#1072;&#1083;&#1080;&#1089;&#1090;&#1086;&#1074;)", /* Russian translation only */
/* 31 Scnd Lang. */     "&#1071;&#1079;&#1099;&#1082;&#1080;, &#1082;&#1086;&#1090;&#1086;&#1088;&#1099;&#1084;&#1080; &#1074;&#1083;&#1072;&#1076;&#1077;&#1102;&#1090; &#1089;&#1086;&#1090;&#1088;&#1091;&#1076;&#1085;&#1080;&#1082;&#1080; &#1082;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1080;/&#1075;&#1088;&#1091;&#1087;&#1087;&#1099;, &#1082;&#1088;&#1086;&#1084;&#1077; &#1088;&#1086;&#1076;&#1085;&#1086;&#1075;&#1086; (&#1082;&#1086;&#1083;&#1080;&#1095;&#1077;&#1089;&#1090;&#1074;&#1086; &#1089;&#1087;&#1077;&#1094;&#1080;&#1072;&#1083;&#1080;&#1089;&#1090;&#1086;&#1074;)", /* Russian translation only */
/* 32 Comps&Other eq */ "&#1048;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1077;&#1084;&#1086;&#1077; &#1090;&#1077;&#1093;&#1085;&#1086;&#1083;&#1086;&#1075;&#1080;&#1095;&#1077;&#1089;&#1082;&#1086;&#1077; &#1086;&#1073;&#1086;&#1088;&#1091;&#1076;&#1086;&#1074;&#1072;&#1085;&#1080;&#1077;", /* Russian translation only */
/* 33 Software Tools */ "&#1048;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1077;&#1084;&#1099;&#1077; &#1080;&#1085;&#1089;&#1090;&#1088;&#1091;&#1084;&#1077;&#1085;&#1090;&#1072;&#1083;&#1100;&#1085;&#1099;&#1077; &#1087;&#1088;&#1086;&#1075;&#1088;&#1072;&#1084;&#1084;&#1099;", /* Russian translation only */
/* 34 Other Refs */     "&#1044;&#1086;&#1087;&#1086;&#1083;&#1085;&#1080;&#1090;&#1077;&#1083;&#1100;&#1085;&#1099;&#1077; &#1088;&#1077;&#1082;&#1086;&#1084;&#1077;&#1085;&#1076;&#1072;&#1094;&#1080;&#1080;", /* Russian translation only */
/* 35 Other Portfs */   "&#1044;&#1086;&#1087;&#1086;&#1083;&#1085;&#1080;&#1090;&#1077;&#1083;&#1100;&#1085;&#1099;&#1081; &#1087;&#1086;&#1088;&#1090;&#1092;&#1077;&#1083;&#1100; &#1088;&#1072;&#1073;&#1086;&#1090;, &#1074;&#1099;&#1087;&#1086;&#1083;&#1085;&#1077;&#1085;&#1085;&#1099;&#1093; &#1082;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1077;&#1081;/&#1075;&#1088;&#1091;&#1087;&#1087;&#1086;&#1081; (&#1089;&#1089;&#1099;&#1083;&#1082;&#1080;)", /* Russian translation only */
/* 36 Summary */        "&#1055;&#1086;&#1083;&#1085;&#1086;&#1077; &#1086;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1077; &#1074;&#1072;&#1096;&#1077;&#1081; &#1050;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1080;/&#1043;&#1088;&#1091;&#1087;&#1087;&#1099; (&#1074; &#1073;&#1091;&#1076;&#1091;&#1097;&#1077;&#1084; &#1042;&#1099; &#1089;&#1084;&#1086;&#1078;&#1077;&#1090;&#1077; &#1087;&#1088;&#1077;&#1076;&#1089;&#1090;&#1072;&#1074;&#1080;&#1090;&#1100; &#1077;&#1075;&#1086; &#1085;&#1072; &#1088;&#1091;&#1089;&#1089;&#1082;&#1086;&#1084; &#1103;&#1079;&#1099;&#1082;&#1077;, &#1080;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1103; Copy - Paste )",
/* 37 Posted by */      "&#1047;&#1072;&#1087;&#1086;&#1083;&#1085;&#1103;&#1077;&#1090;&#1089;&#1103; &#1090;&#1086;&#1083;&#1100;&#1082;&#1086; &#1074; &#1089;&#1083;&#1091;&#1095;&#1072;&#1077;, &#1077;&#1089;&#1083;&#1080; &#1042;&#1099; &#1085;&#1077; &#1091;&#1082;&#1072;&#1079;&#1072;&#1085;&#1099; &#1082;&#1072;&#1082; &#1082;&#1086;&#1085;&#1090;&#1072;&#1082;&#1090;&#1085;&#1072;&#1103; &#1087;&#1077;&#1088;&#1089;&#1086;&#1085;&#1072; (contact person)", /* Russian translation only */
/* 38 Recomm. by */     "&#1048;&#1084;&#1103; &#1080;&#1089;&#1090;&#1086;&#1095;&#1085;&#1080;&#1082;&#1072; (&#1089;&#1087;&#1077;&#1094;&#1080;&#1072;&#1083;&#1080;&#1089;&#1090;, &#1082;&#1086;&#1084;&#1087;&#1072;&#1085;&#1080;&#1103;), &#1087;&#1086; &#1088;&#1077;&#1082;&#1086;&#1084;&#1077;&#1085;&#1076;&#1072;&#1094;&#1080;&#1080; &#1082;&#1086;&#1090;&#1086;&#1088;&#1086;&#1075;&#1086; &#1042;&#1099; &#1087;&#1088;&#1080;&#1096;&#1083;&#1080; &#1085;&#1072; &#1085;&#1072;&#1096; &#1055;&#1086;&#1088;&#1090;&#1072;&#1083;",
/* Company/Team Type ------------------------- */
/* 39 Prj Ownr HT fld */"&#1057;&#1086;&#1073;&#1089;&#1090;&#1074;&#1077;&#1085;&#1085;&#1080;&#1082; &#1087;&#1088;&#1086;&#1077;&#1082;&#1090;&#1072;, &#1088;&#1072;&#1073;&#1086;&#1090;&#1072;&#1102;&#1097;&#1080;&#1081; &#1074; &#1083;&#1102;&#1073;&#1086;&#1081; &#1053;&#1058;-&#1086;&#1090;&#1088;&#1072;&#1089;&#1083;&#1080; (&#1088;&#1072;&#1079;&#1088;&#1072;&#1073;&#1086;&#1090;&#1095;&#1080;&#1082; &#1087;&#1088;&#1086;&#1077;&#1082;&#1090;&#1072;, &#1080;&#1079;&#1075;&#1086;&#1090;&#1086;&#1074;&#1080;&#1090;&#1077;&#1083;&#1100; &#1053;&#1058;-&#1087;&#1088;&#1086;&#1076;&#1091;&#1082;&#1094;&#1080;&#1080; &#1080; &#1090;.&#1087;.)",
/* 40 Prj Ownr Oth    */"&#1057;&#1086;&#1073;&#1089;&#1090;&#1074;&#1077;&#1085;&#1085;&#1080;&#1082; &#1087;&#1088;&#1086;&#1077;&#1082;&#1090;&#1072;, &#1088;&#1072;&#1073;&#1086;&#1090;&#1072;&#1102;&#1097;&#1080;&#1081; &#1074; &#1083;&#1102;&#1073;&#1086;&#1081; &#1076;&#1088;&#1091;&#1075;&#1086;&#1081; (&#1085;&#1077; &#1053;&#1058;-&#1086;&#1090;&#1088;&#1072;&#1089;&#1083;&#1080;)", /* Russian translation only */
/* 41 Provider - Dev */ "&#1048;&#1089;&#1087;&#1086;&#1083;&#1085;&#1080;&#1090;&#1077;&#1083;&#1100; &#1072;&#1091;&#1090;&#1089;&#1086;&#1088;&#1080;&#1085;&#1075;&#1086;&#1074;&#1099;&#1093; &#1088;&#1072;&#1073;&#1086;&#1090;/&#1082;&#1086;&#1085;&#1090;&#1088;&#1072;&#1082;&#1090;&#1086;&#1088;, &#1089;&#1087;&#1077;&#1094;&#1080;&#1072;&#1083;&#1080;&#1079;&#1080;&#1088;&#1091;&#1102;&#1097;&#1080;&#1081;&#1089;&#1103; &#1074; &#1086;&#1076;&#1085;&#1086;&#1081; &#1080;&#1079; &#1053;&#1058;-&#1086;&#1090;&#1088;&#1072;&#1089;&#1083;&#1077;&#1081;",
/* SPECIALIST */
/* 42 Spec. Info */     "&#1048;&#1085;&#1092;&#1086;&#1088;&#1084;&#1072;&#1094;&#1080;&#1103; &#1086; &#1089;&#1087;&#1077;&#1094;&#1080;&#1072;&#1083;&#1080;&#1089;&#1090;&#1077;",
/* 43 Headline */       "&#1050;&#1088;&#1072;&#1090;&#1082;&#1086;&#1077; &#1086;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1077;, &#1093;&#1072;&#1088;&#1072;&#1082;&#1090;&#1077;&#1088;&#1080;&#1079;&#1091;&#1102;&#1097;&#1077;&#1077; &#1042;&#1072;&#1089; (&#1084;&#1086;&#1078;&#1085;&#1086; &#1086;&#1075;&#1088;&#1072;&#1085;&#1080;&#1095;&#1080;&#1090;&#1100;&#1089;&#1103; &#1082;&#1083;&#1102;&#1095;&#1077;&#1074;&#1099;&#1084;&#1080; &#1089;&#1083;&#1086;&#1074;&#1072;&#1084;&#1080; &#1076;&#1083;&#1103; &#1073;&#1086;&#1083;&#1077;&#1077; &#1101;&#1092;&#1092;&#1077;&#1082;&#1090;&#1080;&#1074;&#1085;&#1086;&#1075;&#1086; &#1073;&#1099;&#1089;&#1090;&#1088;&#1086;&#1075;&#1086; &#1087;&#1086;&#1080;&#1089;&#1082;&#1072;)",
/* 44 Motto */          "&#1042;&#1072;&#1096; &#1076;&#1077;&#1074;&#1080;&#1079;/&#1089;&#1083;&#1086;&#1075;&#1072;&#1085; (&#1085;&#1072;&#1087;&#1088;&#1080;&#1084;&#1077;&#1088;, &ldquo;&#1051;&#1091;&#1095;&#1096;&#1077; &#1076;&#1077;&#1083;&#1072;&#1090;&#1100; &#1080; &#1085;&#1077; &#1076;&#1091;&#1084;&#1072;&#1090;&#1100;, &#1095;&#1077;&#1084; &#1076;&#1091;&#1084;&#1072;&#1090;&#1100; &#1080; &#1085;&#1077; &#1076;&#1077;&#1083;&#1072;&#1090;&#1100;&rdquo;)",
/* 45 Contact Info */   "&#1042;&#1072;&#1096;&#1072; &#1082;&#1086;&#1085;&#1090;&#1072;&#1082;&#1090;&#1085;&#1072;&#1103; &#1080;&#1085;&#1092;&#1086;&#1088;&#1084;&#1072;&#1094;&#1080;&#1103;",
/* 46 Type */           "&#1045;&#1089;&#1083;&#1080; &#1042;&#1099; &#1086;&#1090;&#1085;&#1086;&#1089;&#1080;&#1090;&#1077; &#1089;&#1077;&#1073;&#1103; &#1082; Support Service Provider (&#1080;&#1089;&#1087;&#1086;&#1083;&#1085;&#1080;&#1090;&#1077;&#1083;&#1100;/&#1082;&#1086;&#1085;&#1090;&#1088;&#1072;&#1082;&#1090;&#1086;&#1088; &#1074; &#1086;&#1073;&#1083;&#1072;&#1089;&#1090;&#1080; &#1086;&#1073;&#1077;&#1089;&#1087;&#1077;&#1095;&#1080;&#1074;&#1072;&#1102;&#1097;&#1080;&#1093;/&#1074;&#1089;&#1087;&#1086;&#1084;&#1086;&#1075;&#1072;&#1090;&#1077;&#1083;&#1100;&#1085;&#1099;&#1093; &#1088;&#1072;&#1073;&#1086;&#1090;), &#1088;&#1077;&#1082;&#1086;&#1084;&#1077;&#1085;&#1076;&#1091;&#1077;&#1084; &#1097;&#1105;&#1083;&#1082;&#1085;&#1091;&#1090;&#1100; &#1089;&#1086;&#1086;&#1090;&#1074;&#1077;&#1090;&#1089;&#1090;&#1074;&#1091;&#1102;&#1097;&#1091;&#1102; &#1089;&#1089;&#1099;&#1083;&#1082;&#1091; &#1085;&#1080;&#1078;&#1077; &#1076;&#1083;&#1103; &#1074;&#1074;&#1086;&#1076;&#1072; &#1091;&#1090;&#1086;&#1095;&#1085;&#1103;&#1102;&#1097;&#1077;&#1081; &#1080;&#1085;&#1092;&#1086;&#1088;&#1084;&#1072;&#1094;&#1080;&#1080;. &#1063;&#1090;&#1086;&#1073;&#1099; &#1089;&#1087;&#1088;&#1103;&#1090;&#1072;&#1090;&#1100; &#1076;&#1086;&#1087;&#1086;&#1083;&#1085;&#1080;&#1090;&#1077;&#1083;&#1100;&#1085;&#1091;&#1102; &#1092;&#1086;&#1088;&#1084;&#1091; &#1097;&#1105;&#1083;&#1082;&#1085;&#1080;&#1090;&#1077; &#1089;&#1089;&#1099;&#1083;&#1082;&#1091; &#1087;&#1086;&#1074;&#1090;&#1086;&#1088;&#1085;&#1086;",
/* 47 Category */       "&#1045;&#1089;&#1083;&#1080; &#1042;&#1099; &#1089;&#1087;&#1077;&#1094;&#1080;&#1072;&#1083;&#1080;&#1079;&#1080;&#1088;&#1091;&#1077;&#1090;&#1077;&#1089;&#1100; &#1074; &#1053;igh&#1058;ech-&#1086;&#1090;&#1088;&#1072;&#1089;&#1083;&#1080;, &#1088;&#1077;&#1082;&#1086;&#1084;&#1077;&#1085;&#1076;&#1091;&#1077;&#1084; &#1097;&#1105;&#1083;&#1082;&#1085;&#1091;&#1090;&#1100; &#1089;&#1086;&#1086;&#1090;&#1074;&#1077;&#1090;&#1089;&#1090;&#1074;&#1091;&#1102;&#1097;&#1091;&#1102; &#1089;&#1089;&#1099;&#1083;&#1082;&#1091; &#1085;&#1080;&#1078;&#1077; &#1076;&#1083;&#1103; &#1074;&#1074;&#1086;&#1076;&#1072; &#1091;&#1090;&#1086;&#1095;&#1085;&#1103;&#1102;&#1097;&#1077;&#1081; &#1080;&#1085;&#1092;&#1086;&#1088;&#1084;&#1072;&#1094;&#1080;&#1080;. &#1063;&#1090;&#1086;&#1073;&#1099; &#1089;&#1087;&#1088;&#1103;&#1090;&#1072;&#1090;&#1100; &#1076;&#1086;&#1087;&#1086;&#1083;&#1085;&#1080;&#1090;&#1077;&#1083;&#1100;&#1085;&#1091;&#1102; &#1092;&#1086;&#1088;&#1084;&#1091; &#1097;&#1105;&#1083;&#1082;&#1085;&#1080;&#1090;&#1077; &#1089;&#1089;&#1099;&#1083;&#1082;&#1091; &#1087;&#1086;&#1074;&#1090;&#1086;&#1088;&#1085;&#1086;. &#1042; &#1101;&#1090;&#1086;&#1081; &#1074;&#1077;&#1088;&#1089;&#1080;&#1080; &#1088;&#1077;&#1072;&#1083;&#1080;&#1079;&#1086;&#1074;&#1072;&#1085;&#1072; &#1090;&#1086;&#1083;&#1100;&#1082;&#1086; Software Special Features Form",
/* 48 Birthday */       "&#1042;&#1072;&#1096; &#1076;&#1077;&#1085;&#1100; &#1088;&#1086;&#1078;&#1076;&#1077;&#1085;&#1080;&#1103;",
/* 49 Certificate */    "&#1055;&#1088;&#1086;&#1092;&#1077;&#1089;&#1089;&#1080;&#1086;&#1085;&#1072;&#1083;&#1100;&#1085;&#1099;&#1077; &#1089;&#1077;&#1088;&#1090;&#1080;&#1092;&#1080;&#1082;&#1072;&#1094;&#1080;&#1080;, &#1082;&#1086;&#1090;&#1086;&#1088;&#1099;&#1077; &#1042;&#1099; &#1087;&#1088;&#1086;&#1096;&#1083;&#1080; (&#1076;&#1086;&#1087;&#1086;&#1083;&#1085;&#1080;&#1090;&#1077;&#1083;&#1100;&#1085;&#1086; &#1082; &#1091;&#1082;&#1072;&#1079;&#1072;&#1085;&#1085;&#1099;&#1084; &#1074; Special Features Form &#1080; Education)",
/* 50 Relevant Exp. */  "&#1042;&#1072;&#1096; &#1086;&#1087;&#1099;&#1090; &#1088;&#1072;&#1073;&#1086;&#1090;&#1099; &#1074; &#1091;&#1082;&#1072;&#1079;&#1072;&#1085;&#1085;&#1086;&#1081; &#1086;&#1073;&#1083;&#1072;&#1089;&#1090;&#1080;/&#1086;&#1090;&#1088;&#1072;&#1089;&#1083;&#1080;",
/* 51 Work */           "&#1052;&#1077;&#1089;&#1090;&#1072; &#1088;&#1072;&#1073;&#1086;&#1090;&#1099; &#1080; &#1087;&#1088;&#1086;&#1077;&#1082;&#1090;&#1099;, &#1074; &#1082;&#1086;&#1090;&#1086;&#1088;&#1099;&#1093; &#1042;&#1099; &#1087;&#1088;&#1080;&#1085;&#1080;&#1084;&#1072;&#1083;&#1080; &#1091;&#1095;&#1072;&#1089;&#1090;&#1080;&#1077; (&#1087;&#1086;&#1088;&#1090;&#1092;&#1077;&#1083;&#1100; &#1080; &#1088;&#1077;&#1082;&#1086;&#1084;&#1077;&#1085;&#1076;&#1072;&#1094;&#1080;&#1080;)",
/* 52 Education */      "&#1042;&#1072;&#1096;&#1077; &#1086;&#1073;&#1088;&#1072;&#1079;&#1086;&#1074;&#1072;&#1085;&#1080;&#1077; (&#1091;&#1095;&#1077;&#1073;&#1085;&#1099;&#1077; &#1079;&#1072;&#1074;&#1077;&#1076;&#1077;&#1085;&#1080;&#1103; &#1080; &#1075;&#1086;&#1076;&#1099; &#1079;&#1072;&#1074;&#1077;&#1088;&#1096;&#1077;&#1085;&#1080;&#1103;)",
/* 53 Sec. lang. */     "&#1071;&#1079;&#1099;&#1082;&#1080;, &#1082;&#1086;&#1090;&#1086;&#1088;&#1099;&#1084;&#1080; &#1042;&#1099; &#1074;&#1083;&#1072;&#1076;&#1077;&#1077;&#1090;&#1077;, &#1082;&#1088;&#1086;&#1084;&#1077; &#1088;&#1086;&#1076;&#1085;&#1086;&#1075;&#1086;. &#1044;&#1083;&#1103; &#1086;&#1095;&#1080;&#1089;&#1090;&#1082;&#1080; &#1089;&#1083;&#1091;&#1095;&#1072;&#1081;&#1085;&#1086; &#1085;&#1072;&#1078;&#1072;&#1090;&#1086;&#1081; &#1088;&#1072;&#1076;&#1080;&#1086;-&#1082;&#1085;&#1086;&#1087;&#1082;&#1080; &#1074;&#1099;&#1073;&#1077;&#1088;&#1080;&#1090;&#1077; &lsquo;-- Select --&lsquo; &#1080;&#1079; &#1089;&#1087;&#1080;&#1089;&#1082;&#1072; &#1103;&#1079;&#1099;&#1082;&#1086;&#1074;",
/* 54 Oth. portf. */    "&#1044;&#1086;&#1087;&#1086;&#1083;&#1085;&#1080;&#1090;&#1077;&#1083;&#1100;&#1085;&#1099;&#1081; &#1087;&#1086;&#1088;&#1090;&#1092;&#1077;&#1083;&#1100; &#1042;&#1072;&#1096;&#1080;&#1093; &#1088;&#1072;&#1073;&#1086;&#1090; (&#1089;&#1089;&#1099;&#1083;&#1082;&#1080;)",
/* 55 Resume */         "&#1042;&#1072;&#1096;&#1077; &#1088;&#1077;&#1079;&#1102;&#1084;&#1077; (&#1074; &#1073;&#1091;&#1076;&#1091;&#1097;&#1077;&#1084; &#1042;&#1099; &#1089;&#1084;&#1086;&#1078;&#1077;&#1090;&#1077; &#1087;&#1088;&#1077;&#1076;&#1089;&#1090;&#1072;&#1074;&#1080;&#1090;&#1100; &#1077;&#1075;&#1086; &#1085;&#1072; &#1088;&#1091;&#1089;&#1089;&#1082;&#1086;&#1084; &#1103;&#1079;&#1099;&#1082;&#1077;, &#1080;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1103; Copy - Paste)",
/* 56 Proj Owner */     "&#1057;&#1086;&#1073;&#1089;&#1090;&#1074;&#1077;&#1085;&#1085;&#1080;&#1082; &#1087;&#1088;&#1086;&#1077;&#1082;&#1090;&#1072;",
/* 57 Developer */      "&#1057;&#1087;&#1077;&#1094;&#1080;&#1072;&#1083;&#1080;&#1089;&#1090; &#1074; &#1086;&#1076;&#1085;&#1086;&#1081; &#1080;&#1079; &#1053;&#1058;-&#1086;&#1090;&#1088;&#1072;&#1089;&#1083;&#1077;&#1081;: &#1080;&#1089;&#1087;&#1086;&#1083;&#1085;&#1080;&#1090;&#1077;&#1083;&#1100; &#1072;&#1091;&#1090;&#1089;&#1086;&#1088;&#1080;&#1085;&#1075;&#1086;&#1074;&#1099;&#1093; &#1088;&#1072;&#1073;&#1086;&#1090;/&#1082;&#1086;&#1085;&#1090;&#1088;&#1072;&#1082;&#1090;&#1086;&#1088; &#1080;&#1083;&#1080; &#1078;&#1077;&#1083;&#1072;&#1102;&#1097;&#1080;&#1081; &#1090;&#1088;&#1091;&#1076;&#1086;&#1091;&#1089;&#1090;&#1088;&#1086;&#1080;&#1090;&#1100;&#1089;&#1103;",
/* 58 Tester/QA */      "&#1057;&#1087;&#1077;&#1094;&#1080;&#1072;&#1083;&#1080;&#1089;&#1090; &#1074; &#1086;&#1076;&#1085;&#1086;&#1081; &#1080;&#1079; &#1053;&#1058;-&#1086;&#1090;&#1088;&#1072;&#1089;&#1083;&#1077;&#1081;: &#1090;&#1077;&#1089;&#1090;&#1077;&#1088;/QA &#1080;&#1083;&#1080; &#1078;&#1077;&#1083;&#1072;&#1102;&#1097;&#1080;&#1081; &#1090;&#1088;&#1091;&#1076;&#1086;&#1091;&#1089;&#1090;&#1088;&#1086;&#1080;&#1090;&#1100;&#1089;&#1103;",
/* 59 Intermediary */   "&#1055;&#1086;&#1089;&#1088;&#1077;&#1076;&#1085;&#1080;&#1082; (&#1090;&#1088;&#1091;&#1076;&#1086;&#1091;&#1089;&#1090;&#1088;&#1086;&#1081;&#1089;&#1090;&#1074;&#1086; &#1080; &#1090;.&#1087;.)"
);

var lang_tip = new Array(90);

var lang_tip_status = true;

////////////////////////////////////////////////////////////////
function get( Id )
{
   var Elem = ( is_defined( ns4 ) && ns4 ) ? document.layers[ Id ] : ( ie4 ? document.all[ Id ] : document.getElementById( Id ) );

   return( Elem );
}

////////////////////////////////////////////////////////////////
function set( Id, val )
{
   var Elem = ( is_defined( ns4 ) && ns4 ) ? document.layers[ Id ] : ( ie4 ? document.all[ Id ] : document.getElementById( Id ) );

   if ( Elem )
      Elem.value = val;
}

////////////////////////////////////////////////////////////////
function set_all_tips( lang )
{
  if ( lang == 'eng' )
     for ( var i = 0; i < eng_tip.length; i++ )
         lang_tip[ i ] = eng_tip[ i ];
  else if ( lang == 'rus' )
     for ( var i = 0; i < rus_tip.length; i++ )
         lang_tip[ i ] = rus_tip[ i ];
}


////////////////////////////////////////////////////////////////
function ch_lang_menu( lang_menu, style, text )
{
   var cur_style = setItemStyle( lang_menu );
   cur_style.fontWeight = style;
}

////////////////////////////////////////////////////////////////
function ch_lang( lang )
{
   var cur_style;

   if ( lang == 'eng' )
   {
      lang_tip_status = true;
      set_all_tips( 'eng' );
      ch_lang_menu( "eng_menu", "bold" );
      ch_lang_menu( "rus_menu", "normal" );
      ch_lang_menu( "off_menu", "normal" );
   }
   else if ( lang == 'rus' )
   {
      lang_tip_status = true;
      set_all_tips( 'rus' );
      ch_lang_menu( "eng_menu", "normal" );
      ch_lang_menu( "rus_menu", "bold" );
      ch_lang_menu( "off_menu", "normal" );
   }
   else if ( lang == 'off' )
   {
      lang_tip_status = false;
      ch_lang_menu( "eng_menu", "normal" );
      ch_lang_menu( "rus_menu", "normal" );
      ch_lang_menu( "off_menu", "bold" );
   }
}

////////////////////////////////////////////////////////////////
function ch_subj_menu( subj_menu, style )
{
   var cur_style = setItemStyle( subj_menu );
   cur_style.fontWeight = style;
}

////////////////////////////////////////////////////////////////
function ch_subj( subj )
{
   if ( subj == 1 )
   {
      ch_subj_menu( "companies", "bold" );
      ch_subj_menu( "teams", "normal" );
      ch_subj_menu( "specialists", "normal" );
//      if ( url.who != 1 )
//         location.search = "?who=1";
   }
   else if ( subj == 2 )
   {
      ch_subj_menu( "companies", "normal" );
      ch_subj_menu( "teams", "bold" );
      ch_subj_menu( "specialists", "normal" );
//      if ( url.who != 2 )
//         location.search = "?who=2";
   }
   else if ( subj == 3 )
   {
      ch_subj_menu( "companies", "normal" );
      ch_subj_menu( "teams", "normal" );
      ch_subj_menu( "specialists", "bold" );
//      if ( url.who != 3 )
//         location.search = "?who=3";
   }
}


////////////////////////////////////////////////////////////////
function ch_subj_main()
{
  skuda = 1;
  ch_subj( hto );
  get_countriesJS( hto );
  get_categoriesJS( hto );
  view_search( hto, skoko, skuda, shukaj, SeID );
}

////////////////////////////////////////////////////////////////
function getBrowserType()
{
   var type = "none";
   
   if ( ie5 )
      type = "ie5";
   else if ( ie4 )
      type = "ie4";
   else if ( ( is_defined( ns4 ) && ns4 ) )
      type = "ns4";
   else if ( ns6 )
      type = "ns6";

   return( type );
}


////////////////////////////////////////////////////////////////
function toggleLayer( whichLayer )
{
  var style2 = "";
  if ( ie5 )  // and ns6, actually
  {
  // this is the way the standards work
     style2 = get( whichLayer ).style;
     style2.display = style2.display ? "":"block";
  }
  else if ( ie4 )
  {
  // this is the way old msie versions work
     style2 = document.all[ whichLayer ].style;
     style2.display = style2.display ? "":"block";
  }
  else if ( ( is_defined( ns4 ) && ns4 ) )
  {
     // this is the way nn4 works
     style2 = document.layers[ whichLayer ].style;
     style2.display = style2.display ? "":"block";
  }
}


////////////////////////////////////////////////////////////////
function clearText( thefield )
{
  if ( thefield.defaultValue == thefield.value )
     thefield.value = "";
}


////////////////////////////////////////////////////////////////
function setItemStyle( item_ ) // DON'T USE item - it's a keyword!!!
{
  var destination = "";
  
  if ( ie5 ) // and ns6, actually
     destination = get( item_ ).style;
  else if ( ie4 )
     destination = document.all[ item_ ].style;
  else if ( ( is_defined( ns4 ) && ns4 ) )
     destination = document.layers[ item_ ].style;
         
  return( destination );
}


////////////////////////////////////////////////////////////////
function startmenu( n )
{

  var i;

  for ( i = 0; i < n; i++ )
  {
     menuSTYLE[ i ] = setItemStyle( "menu" + i );
     menuSTYLE[ i ].display = "none";
  }

}


////////////////////////////////////////////////////////////////
function menufunc( i )
{
  menuSTYLE[ i ].display = menuSTYLE[ i ].display == "block" ? "none" : "block";
}

/////////////////////////////////////////////////////////////////
function check_ro_fields()
{

//  if ( ns4 && document.layers[ "comp_sl_language_fld1" ] 
//       ||
//       ie5 && get( "comp_sl_language_fld1" )
//       ||
//       ie4 && document.all[ "comp_sl_language_fld1" ]
//     ) Old fashioned way
/*
     if ( get( "sl_fluently_or_read_write_fld1" ) ) // specialist
        for ( i = 1; i <= 7; i++ )
           chk_radio_access2( 'sl_language_fld' + i, 'sl_fluently_or_read_write_fld' + i );
     else
        for ( i = 1; i <= 7; i++ )
           chk_radio_access( 'sl_language_fld' + i, 'sl_r1_' + i, 'sl_r2_' + i );
     else
     if ( get( "sl_l_1" ) )
        for ( i = 1; i <= 7; i++ )
           chk_radio_access( 'sl_l_' + i, 'sl_r1_' + i, 'sl_r2_' + i );
     else
     if ( get( "comp_sl_language_fld1" ) )
        for ( i = 1; i <= 7; i++ )
           chk_input_access( 'comp_sl_language_fld' + i, 'sl_i1_' + i, 'sl_i2_' + i );
     else
     if ( get( "comp_sl_l_1" ) )
        for ( i = 1; i <= 7; i++ )
           chk_input_access( 'comp_sl_l_' + i, 'sl_i1_' + i, 'sl_i2_' + i );
  }
*/

  if ( get( "sl_language_fld1" ) ) // should be for everyone
  {
     if ( get( "sl_i1_1" ) )       // company posting
     {
        for ( i = 1; i <= 7; i++ )
           chk_input_access( 'comp_sl_l_' + i, 'sl_i1_' + i, 'sl_i2_' + i );
     }
     else if ( get( "sl_r1_1" ) )  // specialist posting
     {
        for ( i = 1; i <= 7; i++ )
           chk_radio_access( 'sl_l_' + i, 'sl_r1_' + i, 'sl_r2_' + i );
     }
     else                          // edit
     {
        if ( get( "sl_fluently_or_read_write_fld1" ) ) // specialist
        {
           for ( i = 1; i <= 7; i++ )
              chk_radio_access2( 'sl_language_fld' + i, 'sl_fluently_or_read_write_fld' + i );
        }
        else // company
        {
           for ( i = 1; i <= 7; i++ )
              chk_input_access( 'sl_language_fld' + i, 'sl_fluently_fld' + i, 'sl_read_write_fld' + i );
        }
     }
  }
}

////////////////////////////////////////////////////////////////
function initToolTips()
{
  var i = 0; 

 tot_num = 0;  // Total number of search result strings
 hto     = 1;  // Companies
 skoko   = 10; // Records per page
 skuda   = 1;  // Current record, starting from 1
 shukaj  = ""; // Current search 

  qs  = location.search.substring( 1 );
  nv  = qs.split( '&' );

  for( i = 0; i < nv.length; i++ )
  {
    eq = nv[ i ].indexOf( '=' );
    url[ nv[ i ].substring( 0, eq ).toLowerCase() ] = unescape( nv[ i ].substring( eq + 1 ) );
  }
  //alert( location.search + "nv=" + nv + ";" + "who=" + url.who + "zho=" + url.zho + ";" + "i=" + i );
  // Now, we can get url.var or url[ 'var' ]

  SeID = url.sid;
  if ( SeID && SeID != "" )
     get_SeID( SeID );

  browserType = getBrowserType();
  
  check_ro_fields();
  
  if ( ( is_defined( ns4 ) && ns4 ) || ie5 || ie4 || ns6 )  // It seems that this check is redundant
  {
/*    if ( ns4 )
           toolTipSTYLE = document.layers[ "toolTipLayer" ].style;
    else if ( ie5 )
           toolTipSTYLE = get( "toolTipLayer" ).style;
    else if ( ie4 )
           toolTipSTYLE = document.all[ "toolTipLayer" ].style;
*/
    toolTipSTYLE = setItemStyle( "toolTipLayer" );  // Instead of ugly block above
           
    if ( ( is_defined( ns4 ) && ns4 ) )
           document.captureEvents( Event.MOUSEMOVE );
    else
    {
       toolTipSTYLE.visibility = "visible";
       toolTipSTYLE.display = "none";
    }
 
    document.onmousemove = moveToMouseLoc;
  }
}

////////////////////////////////////////////////////////////////
function toolTip( msg, fg, bg )
{
  if ( toolTip.arguments.length < 1 || msg == "" ) // hide
  {
    if ( ( is_defined( ns4 ) && ns4 ) )
           toolTipSTYLE.visibility = "hidden";
    else
           toolTipSTYLE.display = "none";
  }
  else if ( lang_tip_status == true ) // show
  {
    if ( !fg )
       fg = "#000000";
    if ( !bg )
       bg = "#FFFFFF";
           
    var content =
    '<div class="tooltipez"' +
    ' style="z-index:auto;' +
    ' border-width:1px; border-color:#006633; border-style:solid;' +
    ' padding:6px; background:' + bg +
    '; color:' + fg + ';" align="left">' + msg +
//'(' + browserType + ')' +   // Debug
    '</div>';

//    '<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + fg + '"><td>' +
//    '<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + bg + 
//    '"><td align="center"><font face="sans-serif" color="' + fg +
//    '" size="-2">&nbsp\;' + msg +
//'(' + browserType + ')' +   // Debug
//    '&nbsp\;</font></td></table></td></table>';
        
    if ( ( is_defined( ns4 ) && ns4 ) )
    {
      toolTipSTYLE.document.write( content );
      toolTipSTYLE.document.close();
      toolTipSTYLE.visibility = "visible";
    }
        
    if ( ns6 || ie5 )
    {
      get( "toolTipLayer" ).innerHTML = content;
      toolTipSTYLE.display='block';
    }
        
    if ( ie4 )
    {
      document.all( "toolTipLayer" ).innerHTML = content;
      toolTipSTYLE.display = 'block';
    }
  }
}


////////////////////////////////////////////////////////////////
function moveToMouseLoc( e )
{
  if ( ( is_defined( ns4 ) && ns4 ) || ns6 )
  {
    x = e.pageX;
    y = e.pageY;
  }
  else
  {
    x = event.x + document.body.scrollLeft;
    y = event.y + document.body.scrollTop;
  }

  if ( toolTipSTYLE )
  {
     toolTipSTYLE.left = x + offsetX + "px";
     toolTipSTYLE.top = y - offsetY - 10 + "px";
  }
  
  return true;
}


////////////////////////////////////////////////////////////////
function alphanumer( checkFld )
{
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz0123456789";
  var allValid = true;
  var _unders  = false;
  
  for ( i = 0;  checkFld && i < checkFld.value.length;  i++ )
  {
    ch = checkFld.value.charAt( i );
    for ( j = 0; j < checkOK.length; j++ )
    {
       if ( ch == checkOK.charAt( j ) )
          break;
    }
    
    if ( j == checkOK.length )
    {
      allValid = false;
      break;
    }
  }

  if ( checkFld && checkFld.value.charAt( 0 ) == '_' )
     _unders = true;

  if ( !allValid || _unders )
  {
     if ( _unders )
        put_status( "ID and Password fields CAN NOT begin with an underscore (_)." );
     else
        put_status( "Please enter only underscore (_), alphabet and numeric characters here." );

     if ( checkFld.type == "password" ) // Don't clear the id field - let him/her do the changes
        checkFld.value='';

     checkFld.focus();
     allValid = false;
  }

  if ( allValid )
     put_status( "" );
  
  return( allValid );
}


////////////////////////////////////////////////////////////////
function slepim_datu( whole_date, day, month, year )
{

  if ( day.value == '00' ) // default, 'DD'
     day.value = '01';

  if ( month.value == '00' ) // default, 'MM'
     month.value = '01';

  whole_date.value = year.value + month.value + day.value;

  if ( year.value == '0000' ) // Don't put the date into the database if year is not set
     whole_date.value = '';

  return( whole_date.value );
}

////////////////////////////////////////////////////////////////
function razlepim_datu( whole_date, day, month, year )
{
  // 1996-12-26
  if ( whole_date && whole_date.value )
  {
     day.value = whole_date.value.substring( 8, 10 );

     month.value = whole_date.value.substring( 5, 7 );

     year.value = whole_date.value.substring( 0, 4 );
  }
}


////////////////////////////////////////////////////////////////
function validate_uid_pwd_field( fld, name )
{
  var passed = true;

  if ( fld && fld.value=='' )
  {
     put_status( "Please fill out \"" + name + "\" field!" );
     fld.focus();
     passed = false;
  }
  else if ( fld && fld.value.length < 6 )
  {
     put_status( "\"" + name + "\" should be at least 6 characters long!" );
     if ( fld.type == "password" )
        fld.select();
     fld.focus();
     passed = false;
  }
  else  if ( fld )
     passed = alphanumer( fld ); 

  if ( passed )
     put_status( "" );
  
  return( passed );
}

////////////////////////////////////////////////////////////////
function verify_pwds( fld1, fld2 )
{
     if ( fld1.value != fld2.value )
     {
        put_status( "Passwords do not match!" );
        fld1.select();
        fld2.focus();
     }
     else
        put_status( "" );
}


////////////////////////////////////////////////////////////////
function passed_global_set( val )
{
  passed_global = val;
}

////////////////////////////////////////////////////////////////
function validate_form( val1, val1_, val2, val2_, val3, val4, est_date_all,
                        est_date_day, est_date_month, est_date_year ) 
                        // val1 - ID, val2 - e-mail, val3, val4 - passwords fields
{
  var passed = false;

  passed = validate_uid_pwd_field( val1, "ID" );

  if ( passed )
     passed = validate_uid_pwd_field( val3, "Password" );

  if ( passed )
     passed = validate_uid_pwd_field( val4, "Verify Password" );

  if ( passed )
  {
     passed = false;

     if ( val2_ && val2_.value=='' )
     {
        put_status3( "Please fill out \"Country\" field!" );
        val2_.focus();
     }
     else if ( val2_ && val2.value=='' )
     {
        put_status2( "Please fill out \"E-mail\" field!" );
        val2.focus();
     }
     else if ( val3 && val3.value != val4.value )
     {
        put_status( "Passwords do not match!" );
        val3.select();
        val3.focus();
     }
     else
     {
       if ( est_date_all )
          slepim_datu( est_date_all, est_date_day, est_date_month, est_date_year );

       passed = alphanumer( val1 ) && alphanumer( val3 ) && alphanumer( val4 );

       if ( passed )
       {
         passed = emailCheck( val2.value );
         if ( !passed )
            val2.focus();
         else
            put_status2( "" );
       }

       if ( passed )
       {
          passed_global = passed;

          loaded_script_was_executed = false;

          if ( val1_ && typeof( val1_ ) == 'object' ) // hack -> consider better solution
             check_user_name( val1, 1 );
          else if ( val1_ && val1_.lastIndexOf( 'edit' ) == 0 ) 
          {
             var old_user_name = val1_.split( ':' );
             check_user_name( val1, 1, old_user_name[ 1 ] );
          }
   
          //if ( val1_.value != '' )        // Group membership
          //   check_user_name( val1_, 0 );

          // while ( loaded_script_was_executed != true );


          // !!!!!!!!! Maybe we will need to uncomment the below code - check it!
          // setTimeout( "dummy()", 1000 );

          passed = passed_global;
       }
     }

     if ( passed )
     {
        put_status( "" );
        put_status2( "" );
        put_status3( "" );
     }
  }

  return( passed );
}


////////////////////////////////////////////////////////////////
function check_user_name( field, fail_if_exist, old_uname )
{
  var src = cgi_path + "validateJS.pl?"
            + field.name + "=" + field.value + "=" + fail_if_exist + "=" + old_uname;
  var body = document.getElementsByTagName( 'body' ).item( 0 );
  var previous = get( 'loadedScript' );

  var passed = true;

//  if ( fail_if_exist == 1 || fail_if_exist == 3 ) // ID (name) is checked for duplicate
//     passed = validate_uid_pwd_field( field, "ID" );

  if ( passed )
  {  
     remove( previous );

     script = document.createElement( 'script' );
     script.src = src;
     script.type = 'text/javascript';
     script.id = 'loadedScript';
     script.defer = true;
     body.appendChild( script );
     setTimeout( "dummy()", 1000 );
  }
}


////////////////////////////////////////////////////////////////
function put_stats1( comp, team, spec, total, countries )
{
var months = new Array( "January", "February", "March", "April",
                        "May", "June", "July", "August",
                        "September", "October", "November", "December" );
var currentTime = new Date();
var day = currentTime.getDate();
var month = months[ currentTime.getMonth() ];
var year = currentTime.getFullYear();
var hours = currentTime.getHours();
var minutes = currentTime.getMinutes();
var seconds = currentTime.getSeconds();
var dest;
//alert( countries );
var countries_arr = countries.split( "," );
var n_countries   = countries_arr.length;
var n_countries_real = countries_arr[0];
var n_others      = total;

var countries_table = "<table width='90' padding='0' border='0' align='center'>";
var kuvychki        = '"';

var i = 0;

for( i = 1; i <= ( n_countries - 1 ) / 2; i++ )
{
   n_others -= ( countries_arr[ ( i - 1)*2 + 1 ]*1 );  // Other countries = total - sum( countries )
}

for( i = 1; i <= ( n_countries - 1 ) / 2; i++ )
{
var strana = countries_arr[ ( i - 1 )*2 + 2 ];

countries_table += "<tr><td width='35'><span class='stat_box_text_normal' onMouseOver='toolTip(" + 
//                   kuvychki + strana + kuvychki +
                   "\"" + strana + "\"" +
                   ")' onMouseOut='toolTip()'><img src='flags/" + strana + ".gif'/>" +
                   "</span></td><td width='20'><span class='stat_box_text_normal'>-</span></td>" +
                   "<td width='35'><span class='stat_box_text_normal'>" + countries_arr[ ( i - 1 )*2 + 1 ]*1 +
                   "</span></td></tr>";
}

/* countries_table += "<tr><td width='120'><span class='stat_box_text_normal'>Others</span></td>" +
                   "<td width='10'><span class='stat_box_text_normal'>-</span></td>" +
                   "<td width='20'><span class='stat_box_text_normal'>" + n_others + "</span></td></tr>"; */


countries_table += "</table>";

  if ( minutes < 10 )
     minutes = "0" + minutes;
  if ( hours < 10 )
     hours = "0" + hours;
  if ( seconds < 10 )
     seconds = "0" + seconds;


  dest = get( "_stat_box" );

  dest.innerHTML = "<table width='200' padding='0' border='0'><tr><td><span class='stat_box_text_normal'><b>Today</b>, " + month + " " + day + ", " + year +
                   "</span></td></tr><tr><td><span class='stat_box_text_normal'>" +
                   "in iTechBridge Database:</span></td></tr></table>" +

                   "<table border='0'>" +
                   "<tr><td width='75' padding='0'><span class='stat_box_text'>Companies</span></td>" + 
                   "<td width='27' padding='0'><span class='stat_box_text_normal'>-</span></td>" +
                   "<td width='28' padding='0'><span class='stat_box_text_green'>" + comp + "</span></td></tr>" +
                   "<tr><td width='75' padding='0'><span class='stat_box_text'>Teams</span></td>" +
                   "<td width='27' padding='0'><span class='stat_box_text_normal'>-</span></td>" +
                   "<td  width='28' padding='0'><span class='stat_box_text_green'>" + team + "</span>" + "</td></tr>" +
                   "<tr><td width='75' padding='0'><span class='stat_box_text'>Specialists</span></td>" +
                   "<td width='27' padding='0'><span class='stat_box_text_normal'>-</span></td>" +
                   "<td width='28' padding='0'><span class='stat_box_text_green'>" + spec + "</span></td></tr>" +
                   "</table>" +
                   "<div class='linejka_stat' style='font-size: 1pt'></div>" +
                   "<table border='0'><tr>" +
                   "<td width='75'><span class='stat_box_text'>Total</span></td>" +
                   "<td width='27'><span class='stat_box_text_normal'>-</span></td>" +
                   "<td width='28'><span class='stat_box_text_green'><b>" + total + "</b></span></td></tr></table>" +
                   "<table border='0'><tr>" +
                   "<td width='40'><span class='stat_box_text_normal'>from</span>" +
                   "<td width='25'><span class='stat_box_text_green'><b>" + n_countries_real + "</b></span>" +
                   "<span class='stat_box_text_normal'>&nbsp;countries,</span></td>" +
                   "<td width='25'><span class='stat_box_text_normal'>including:</td></span>" +
                   "</tr></table>" +
                   countries_table;

//window.setTimeout( "date_n_count_call()", 30000 );
//" + hours + ":" + minutes + ":" + seconds 
//                   "<b>Companies</br><div class='stat_box_text'>" + comp  + "</div><br/>" +
//                   "<b>Teams</b><div class='stat_box_text'>" + team  + "</div><br/>" +
//                   "<b>Specialists</b><div class='stat_box_text'>" + spec  + "</div><br/>" +
//                   "<b>Total<div class='stat_box_text'>" + total + "</div></b>";
}

////////////////////////////////////////////////////////////////
function put_stats2( comp, team, spec, total, countries )
{
  var months = new Array( "January", "February", "March", "April",
                          "May", "June", "July", "August",
                          "September", "October", "November", "December" );               
  var currentTime = new Date();
  
  var day = currentTime.getDate();
  get( "day" ).innerHTML = day;
  
  var month = months[ currentTime.getMonth() ];
  get( "month" ).innerHTML = month;
  
  var year = currentTime.getFullYear();
  get( "year" ).innerHTML = year;
  
  //alert( countries );
  
  var countries_arr = countries.split( "," );
  var n_countries   = countries_arr.length;
  
  
  get( "comps" ).innerHTML = comp;
  get( "teams" ).innerHTML = team;
  get( "specs" ).innerHTML = spec;
  get( "total" ).innerHTML = total;
  
  get( "cntrs" ).innerHTML = countries_arr[0]; // countries real number
  
/*
      <tr> 
        <td width="35"><span class="stat_box_text_normal"><img id="cntr_img1"></span></td>
        <td width="20"><span class="stat_box_text_normal">-</span></td>
        <td width="35"><span id="cntr1" class="stat_box_text_normal"></span></td>
      </tr>
      <tr> 
        <td width="35"><span class="stat_box_text_normal"><img id="cntr_img2"></span></td>
        <td width="20"><span class="stat_box_text_normal">-</span></td>
        <td width="35"><span id="cntr2" class="stat_box_text_normal"></span></td>
      </tr>
      <tr> 
        <td width="35"><span class="stat_box_text_normal"><img id="cntr_img3"></span></td>
        <td width="20"><span class="stat_box_text_normal">-</span></td>
        <td width="35"><span id="cntr3" class="stat_box_text_normal"></span></td>
      </tr>
      <tr> 
        <td width="35"><span class="stat_box_text_normal"><img id="cntr_img4"></span></td>
        <td width="20"><span class="stat_box_text_normal">-</span></td>
        <td width="35"><span id="cntr4" class="stat_box_text_normal"></span></td>
      </tr>
*/

  var i;
  var str = '<table padding="0" align="center" border="0" width="90"><tbody>';

  for( i = 1; i <= ( n_countries - 1 ) / 2; i++ )
  {
     var strana = countries_arr[ ( i - 1 )*2 + 2 ];
     var subjs  = countries_arr[ ( i - 1 )*2 + 1 ] * 1;

     //cntr_img.innerHTML = "<span class='stat_box_text_normal' onmouseover='toolTip(\"" + strana + "\")' onmouseout='toolTip()'><img src='presentation/flags/" + strana + ".gif'></span>";

     str += '<tr>' + 
            '<td width="35"><span class="stat_box_text_normal" onmouseover="toolTip(\'' + strana + '\')" onmouseout="toolTip()">' +
            '<img src="presentation/flags/' + strana + '.gif"></span></td>' +
            '<td width="20"><span class="stat_box_text_normal">-</span></td>' +
            '<td width="35"><span class="stat_box_text_normal">' + subjs + '</span></td>' +
            '</tr>';
  }

  str += '</tbody></table>';

//  alert( str );
  get( "countries" ).innerHTML = str;
}

////////////////////////////////////////////////////////////////
function date_n_count_call( num )
{
  var src = cgi_path + "counterJS_under.pl?" + num;
  var body = document.getElementsByTagName( 'body' ).item( 0 );
  var previous = get( 'loadedScript2' );

  remove( previous );

  script = document.createElement( 'script' );
  script.src = src;
  script.type = 'text/javascript';
  script.id = 'loadedScript2';
  script.defer = true;
  body.appendChild( script );
//  setTimeout( "dummy()", 1000 );
}


////////////////////////////////////////////////////////////////
function check_sh_name( field )
{
  var src = cgi_path + "shNameValidateJS_under.pl?" +
            field.value + "=" + field.value + "=" + field.value;

  var body = document.getElementsByTagName( 'body' ).item( 0 );
  var previous = get( 'loadedScript3' );

  var passed = true;

  if ( passed )
  {  
     remove( previous );

     script = document.createElement( 'script' );
     script.src = src;
     script.type = 'text/javascript';
     script.id = 'loadedScript3';
     script.defer = true;
     body.appendChild( script );
     setTimeout( "dummy()", 1000 );
  }
}

////////////////////////////////////////////////////////////////
function goto_frst( l_hto )
{
  //cur_page = 1;
  //skuda = ( cur_page - 1 ) * skoko + 1;

  skuda = 1;
  
  view_search( hto, skoko, skuda, shukaj, SeID );
}

////////////////////////////////////////////////////////////////
function goto_prev( l_hto )
{
  //cur_page--;

  //if ( cur_page < 1 ) // Sanity check
  //   cur_page = 1;

  //skuda = ( cur_page - 1 ) * skoko + 1;

  skuda -= skoko;
  if ( skuda < 1 )
     skuda = 1;
  
  view_search( hto, skoko, skuda, shukaj, SeID ); //get( 'search' ).value );
}

////////////////////////////////////////////////////////////////
function goto_next( l_hto )
{
  //cur_page++;

  //if ( cur_page > num_pages ) // Sanity check
  //   cur_page = num_pages;

  //skuda = ( cur_page - 1 ) * skoko + 1;

  skuda += ( skoko * 1 );
  if ( skuda > tot_num )
     skuda -= skoko; // back out, bitch
  
  view_search( hto, skoko, skuda, shukaj, SeID );
}

////////////////////////////////////////////////////////////////
function goto_last( l_hto )
{
  //cur_page = num_pages;

  //skuda = ( cur_page - 1 ) * skoko + 1;

  skuda = ( num_pages - 1 ) * skoko + 1;
  
  view_search( hto, skoko, skuda, shukaj, SeID );
}

////////////////////////////////////////////////////////////////
function put_search_nav( l_hto )
{
document.write( "<table border='0' cellpadding='0' cellspacing='0' width='739'>" +
                " <tr align='center'>" +
                "  <td width='8' height='1'>&nbsp;&nbsp;" +
                "  </td>" +
                "  <td><a href='javascript:goto_frst(" + l_hto + ");'>&lt;&lt;</a>&nbsp;&nbsp;&nbsp;" +
                "      <a href='javascript:goto_prev(" + l_hto + ");'>&lt;Prev</a>&nbsp;&nbsp;&nbsp;" +
                "" +
                "      <a href='javascript:goto_next(" + l_hto + ");'>Next&gt;</a>&nbsp;&nbsp;&nbsp;" +
                "      <a href='javascript:goto_last(" + l_hto + ");'>&gt;&gt;</a>" +
                "  </td>" +
                " </tr>" +
                "</table>"
              );
}

////////////////////////////////////////////////////////////////
function putstats( start, step, total )
{

   start = start * 1;
   step  = step * 1;
   total = total * 1;

   if ( step > total )
      step = total;


   var content = "<b>" + start + "</b>" + "-" + "<b>" + step + "</b>" + " of " + "<b>" + total + "</b>";
   get( "stats" ).innerHTML = content;
}

////////////////////////////////////////////////////////////////
function show_countries_list( arr )
{
   var cntrs_arr = arr.split( "," );
   var i = 0;
   var j = 0;
 
   var content_beg = '<table width="100%" border="0" cellpadding="0" cellspacing="2" align="center">' +
                     '<tr><div><span class="style80">';

   var content_end = '</span></div></tr></table>';

   var inna = content_beg;
   var kuvychki = '"';
   var c_n_num  = "";
   var rExp = new RegExp( " ", "g" );
   var str_len = 0;
   var frst_str = 0;
   var oth_str = 0;
   var found = 0;

   inna += "<tr>"; //"<tr><td align='left'>Countries:</td></tr><tr>";

   for ( i = 0;  i < cntrs_arr.length; i++ )
   {

       str_len += cntrs_arr[ i ].length;
 
       if ( !found )
          frst_str++;
       else
          oth_str++;          

       c_n_num = cntrs_arr[ i ].split( "_" );

       //alert( "c - " + c_n_num[0] + " n - " + c_n_num[1] ); 


       if ( str_len > 75 || ( oth_str && ( oth_str >= frst_str - 1 ) ) )
       {

//       alert( "<<" + str_len + ">>" + "<<" + frst_str + ">>" + "<<" + oth_str + ">>");
          inna += "</tr><tr>";
          str_len = 0;
          found = 1;
          oth_str = 0;
       }

       inna += "<td width='200px' align='left'>" +
           //  "<span onMouseOver='toolTip(" + kuvychki + c_n_num[0] + kuvychki + ")' onMouseOut='toolTip()'>" +
               "<a href='javascript:search_by_token(" + kuvychki + c_n_num[0] + "_anchor" + kuvychki + ");'>" +
          //   "<img src='flags/" +
                c_n_num[0].replace( rExp, "\&nbsp;" ) +
                "</a>(" +
        //        ".gif'/> - " + 
                c_n_num[1] +
                ")" +
                "</span></td>";
        
       //alert( "<<" + inna + ">>" );

   }

   inna += "</tr>";
   inna += content_end;

   get( "cntrs" ).innerHTML = inna;   
}

////////////////////////////////////////////////////////////////
function show_categories_list( arr )
{
   var ctgrs_arr = arr.split( "," );
   var i = 0;
   var j = 0;
 
   var content_beg = '<table width="100%" border="0" cellpadding="0" cellspacing="2" align="center">' +
                     '<tr><div><span class="style80">';

   var content_end = '</span></div></tr></table>';

   var inna = content_beg;
   var kuvychki = '"';
   var c_n_num  = "";

   //inna += "<tr><td align='left'>Categories:</td></tr>";

   for ( i = 0;  i < ctgrs_arr.length; i++ )
   {

       c_n_num = ctgrs_arr[ i ].split( "_" );

       //alert( "c - " + c_n_num[0] + " n - " + c_n_num[1] ); 

       inna += "<td width='200' align='left'>" +
               "<a href='javascript:search_by_token(" + kuvychki + c_n_num[0] + "_anchor" + kuvychki + ");'>" +
               c_n_num[0] + "</a>(" + c_n_num[1] + ")</td>";
       //alert( "<<" + inna + ">>" );

   }

   inna += content_end;

   get( "ctgrs" ).innerHTML = inna;   
}

////////////////////////////////////////////////////////////////
function drawLine( lineObjectHandle, Ax, Ay, Bx, By, lineImgPath )
{
  /*
  *lineObjectHandle = an IMG tag with position:absolute
  */
  var
  xMin= Math.min( Ax, Bx ),
  yMin= Math.min( Ay, By ),
  xMax= Math.max( Ax, Bx ),
  yMax= Math.max( Ay, By ),
  boxWidth= Math.max( xMax-xMin, 1 ),
  boxHeight= Math.max( yMax-yMin, 1 ),
  tmp= Math.min( boxWidth, boxHeight ),
  smallEdge= 1,
  newSrc;


  while ( tmp>>=1 )
     smallEdge<<=1;

  newSrc = lineImgPath;

  if ( lineObjectHandle.src.indexOf(  newSrc ) == -1 )
     lineObjectHandle.src = newSrc;

  with( lineObjectHandle.style )
  {
     width = boxWidth + "px";
     height = boxHeight + "px";
     left = xMin + "px";
     top = yMin + "px";
  }
}

////////////////////////////////////////////////////////////////
function show_search_list( arr )
{
   var comp_arr = arr.split( "<__@__>" );
   var i = 0;
   var j = 0;

   var is_prem = 0;
   var is_reg = 0;

   var inna = "";
   var color = "#dddddd";
   var content_beg = '<table width="100%" border="0" cellpadding="0" cellspacing="7" bgcolor="';
   var content_mid = '" align="center"><tr><div style="overflow:hidden"><span class="style80">';
   var content_end = '</span></div></tr></table>';
   var ii = 2;
   var rExp;

   var dont_replace = shukaj.lastIndexOf( '_anchor' );

   var comp_or_spec = ( hto == 1 ) ? "Companies>" : ( ( hto == 2 ) ? "Teams>" : "Specialists>" );
   var srch_stat = ( dont_replace > 0 ) ? comp_or_spec + shukaj.substring( 0, dont_replace ) :
                                          comp_or_spec + shukaj;

   get( "srch_status" ).innerHTML = srch_stat;

   //alert( " " + dont_replace + " " );

   tot_num = comp_arr[ 0 ];

   if ( tot_num == 0 )
   {
      inna = content_beg + color + content_mid + "<td>Sorry, nothing was found...</td>" + content_end;
   }
   else
   {


      for ( i = 1;  ( !is_prem || !is_reg ) && i < comp_arr.length; i++ ) // Start from 1 - 0 is a count
      {
         if ( !is_prem )
            is_prem = ( comp_arr[ i ].lastIndexOf( '>S<' )>0 || comp_arr[ i ].lastIndexOf( '>G<' )>0 || comp_arr[ i ].lastIndexOf( '>L<' )>0 ||
                        comp_arr[ i ].lastIndexOf( '>F<' )>0 || comp_arr[ i ].lastIndexOf( '>P<' )>0 );
         if ( !is_reg )
            is_reg =  ( comp_arr[ i ].lastIndexOf( '>C<' )>0 || comp_arr[ i ].lastIndexOf( '>R<' )>0 || comp_arr[ i ].lastIndexOf( '>E<' )>0 ||
                        comp_arr[ i ].lastIndexOf( '>W<' )>0 );
      }
      i--;
      //i contains either length or the place, when Premiums end

//   alert( " " + is_prem + " " + is_reg + " " + i );
      var beg_membs = "<td width='100%' colspan='3' valign='top'><div style='overflow:hidden'><span class='style80' style='font-size: 10px;'>";
      var end_membs1 = "&nbsp;&nbsp;<img id='line00"; //drawLine( get( 'line000' ), 0, 0, 100, 0, 'clipart/lines/horizontal/orangeShortThickLine.gif' );
      var left_px    = "1";
      var end_membs2 = "'/></span></div></td>";
      if ( is_prem )
      {
         comp_arr[ 0 ] = beg_membs + "Premium Members" + end_membs1 + left_px + end_membs2;
         if ( is_reg ) // there is a border, for sure
         {
            left_px = "2";
            var reg_str = beg_membs + "Others" + end_membs1 + left_px + end_membs2;
            var tail = comp_arr.splice( i, comp_arr.length - i, reg_str );
            //   alert( " " + tail.length + " " + comp_arr.length + " " + i );
            comp_arr = comp_arr.concat( tail );
            //   alert( " " + tail.length + " " + comp_arr.length + " " + i );
         }
      }
      else if ( is_reg )
      {
         if ( is_prem )
            comp_arr[ 0 ] =  beg_membs + "Others" + end_membs1 + left_px + end_membs2;
         else
            j = 1;
      }
      else
         j = 1;

      for ( i = j;  i < comp_arr.length; i++ )
      {
          var color_selector = 0;
          color_selector =  i % ii;

       
          // Get rid of last comma 
          //for ( j = comp_arr[ i ].length - 1; j >= 0, comp_arr[ i ].charAt( j ) != ','; j-- );
          j = comp_arr[ i ].lastIndexOf(',');
          if ( j >= 0 )
             comp_arr[ i ] = comp_arr[ i ].substring( 0, j ) + comp_arr[ i ].substring( j + 1, comp_arr[ i ].length ) ;

          rExp = / \(\)/g;
          comp_arr[ i ] = comp_arr[ i ].replace( rExp, "" );

          rExp = /\.{4,}/g;
          comp_arr[ i ] = comp_arr[ i ].replace( rExp, "..." );

          rExp = /\)\ \.\.\./g;
          comp_arr[ i ] = comp_arr[ i ].replace( rExp, ")" );

          //alert( shukaj );
          // postpone it until parsing is done
          if ( 0 && shukaj.length >= 3 && dont_replace < 0 )
          {
            // var reg_shukaj = escape( shukaj );
            // alert( " reg_search = " + reg_shukaj );

             rExp = new RegExp( shukaj, "g" );
             comp_arr[ i ] = comp_arr[ i ].replace( rExp, "<span style=\'color:#CC3300\'>" + shukaj + "</span>" );
          }

          if (  color_selector != 0  )
             color = "#eeeeee";
          else
             color = "#dddddd";

          inna += content_beg + color + content_mid + comp_arr[ i ] + content_end;
      }
   }
   get( "main_table" ).innerHTML = inna;
   //get( "nav" ).innerHTML += '<script> put_search_nav( hto ); </script>';
      
   if ( is_prem )
      drawLine( get( 'line001' ), 0, -1, 580, 0, '/images/line.gif' );
   if ( is_reg && is_prem )
      drawLine( get( 'line002' ), 0, -1, 650, 0, '/images/line.gif' );

   // Update global variables
   num_pages = parseInt( tot_num / skoko );
   var remainder = parseInt( tot_num % skoko );

   num_pages += parseInt( ( tot_num - num_pages * skoko ) / ( remainder ? remainder : 1 ) );

   //cur_page  = parseInt( skuda / skoko ) + 1;

   if ( tot_num == 0 )
      putstats( 0, 0, 0 );
   else
      putstats( skuda * 1, skuda * 1 + skoko * 1 - 1, tot_num * 1 );

}

////////////////////////////////////////////////////////////////
function show_news_list( arr, num_cont, Nav )
{
   var comp_arr = arr.split( "<__@__>" );
   var i = 0;
   var j = 0;

   var is_prem = 0;
   var is_reg = 0;

   var inna = "";
   var cont = "tcontent" + num_cont;
   var color = "#dddddd";
   var content_beg = '<table width="100%" border="0" cellpadding="0" cellspacing="7" bgcolor="';
   var content_mid = '" align="center"><tr><div style="overflow:hidden"><span class="style80">';
   var content_end = '</span></div></tr></table>';
   var ii = 2;
   var rExp;

   var dont_replace = shukaj.lastIndexOf( '_anchor' );

   //var comp_or_spec = ( hto == 1 ) ? "Companies>" : ( ( hto == 2 ) ? "Teams>" : "Specialists>" );
   //var srch_stat = ( dont_replace > 0 ) ? comp_or_spec + shukaj.substring( 0, dont_replace ) :
                                          //comp_or_spec + shukaj;

   var srch_stat = "";

   get( "srch_status" ).innerHTML = srch_stat;

   //alert( " " + dont_replace + " " );

   tot_num = comp_arr[ 0 ];

   if ( tot_num == 0 )
   {
      inna = content_beg + color + content_mid + "<td>Sorry, nothing was found...</td>" + content_end;
   }
   else
   {


      for ( i = 1;  ( !is_prem || !is_reg ) && i < comp_arr.length; i++ ) // Start from 1 - 0 is a count
      {
         if ( !is_prem )
            is_prem = ( comp_arr[ i ].lastIndexOf( '>S<' )>0 || comp_arr[ i ].lastIndexOf( '>G<' )>0 || comp_arr[ i ].lastIndexOf( '>L<' )>0 ||
                        comp_arr[ i ].lastIndexOf( '>F<' )>0 || comp_arr[ i ].lastIndexOf( '>P<' )>0 );
         if ( !is_reg )
            is_reg =  ( comp_arr[ i ].lastIndexOf( '>C<' )>0 || comp_arr[ i ].lastIndexOf( '>R<' )>0 || comp_arr[ i ].lastIndexOf( '>E<' )>0 ||
                        comp_arr[ i ].lastIndexOf( '>W<' )>0 );
      }
      i--;
      //i contains either length or the place, when Premiums end

//   alert( " " + is_prem + " " + is_reg + " " + i );
      var beg_membs = "<td width='100%' colspan='3' valign='top'><div style='overflow:hidden'><span class='style80' style='font-size: 10px;'>";
      var end_membs1 = "&nbsp;&nbsp;<img id='line00"; //drawLine( get( 'line000' ), 0, 0, 100, 0, 'clipart/lines/horizontal/orangeShortThickLine.gif' );
      var left_px    = "1";
      var end_membs2 = "'/></span></div></td>";
      if ( is_prem )
      {
         comp_arr[ 0 ] = beg_membs + "Premium Members" + end_membs1 + left_px + end_membs2;
         if ( is_reg ) // there is a border, for sure
         {
            left_px = "2";
            var reg_str = beg_membs + "Others" + end_membs1 + left_px + end_membs2;
            var tail = comp_arr.splice( i, comp_arr.length - i, reg_str );
            //   alert( " " + tail.length + " " + comp_arr.length + " " + i );
            comp_arr = comp_arr.concat( tail );
            //   alert( " " + tail.length + " " + comp_arr.length + " " + i );
         }
      }
      else if ( is_reg )
      {
         if ( is_prem )
            comp_arr[ 0 ] =  beg_membs + "Others" + end_membs1 + left_px + end_membs2;
         else
            j = 1;
      }
      else
         j = 1;

      for ( i = j;  i < comp_arr.length; i++ )
      {
          var color_selector = 0;
          color_selector =  i % ii;


          // Get rid of last comma
          //for ( j = comp_arr[ i ].length - 1; j >= 0, comp_arr[ i ].charAt( j ) != ','; j-- );
          j = comp_arr[ i ].lastIndexOf(',');
          if ( j >= 0 )
             comp_arr[ i ] = comp_arr[ i ].substring( 0, j ) + comp_arr[ i ].substring( j + 1, comp_arr[ i ].length ) ;

          rExp = / \(\)/g;
          comp_arr[ i ] = comp_arr[ i ].replace( rExp, "" );

          rExp = /\.{4,}/g;
          comp_arr[ i ] = comp_arr[ i ].replace( rExp, "..." );

          rExp = /\)\ \.\.\./g;
          comp_arr[ i ] = comp_arr[ i ].replace( rExp, ")" );

          //alert( shukaj );
          // postpone it until parsing is done
          if ( 0 && shukaj.length >= 3 && dont_replace < 0 )
          {
            // var reg_shukaj = escape( shukaj );             // alert( " reg_search = " + reg_shukaj );

             rExp = new RegExp( shukaj, "g" );
             comp_arr[ i ] = comp_arr[ i ].replace( rExp, "<span style=\'color:#CC3300\'>" + shukaj + "</span>" );
          }

          if (  color_selector != 0  )
             color = "#eeeeee";
          else
             color = "#dddddd";

          inna += content_beg + color + content_mid + comp_arr[ i ] + content_end;
      }
   }
   get( "main_table" ).innerHTML = inna;
//   get( cont ).innerHTML = Nav + inna;

   if ( is_prem )
      drawLine( get( 'line001' ), 0, -1, 580, 0, '/images/line.gif' );
   if ( is_reg && is_prem )
      drawLine( get( 'line002' ), 0, -1, 650, 0, '/images/line.gif' );

   // Update global variables
   num_pages = parseInt( tot_num / skoko );
   var remainder = parseInt( tot_num % skoko );

   num_pages += parseInt( ( tot_num - num_pages * skoko ) / ( remainder ? remainder : 1 ) );

   //cur_page  = parseInt( skuda / skoko ) + 1;

   if ( tot_num == 0 )
      putstats( 0, 0, 0 );
   else
      putstats( skuda * 1, skuda * 1 + skoko * 1 - 1, tot_num * 1 );

}

////////////////////////////////////////////////////////////////
function put_value( Elem, id, val )
{
     if ( Elem )
     {
      if ( Elem.type == "text" || Elem.type == "textarea" || Elem.type == "checkbox" || Elem.type == "password" )
      {
         Elem.value = val;

         if ( Elem.type == "checkbox" )
            Elem.checked = 1;
      }
      else if ( Elem.type == "select-one" )
      {
         if ( val.length == 1 )
            Elem.selectedIndex = val;
         else if ( val.length > 1 )
            Elem.value = val;
         else
            Elem.selectedIndex = -1; // for NULL values
      }
      else if ( Elem.type == "radio" )
      {
         var radio_form = id + "_form";

         if ( document.forms[ radio_form ] )
            document.forms[ radio_form ].elements[ val - 1 ].checked = 1; // through ass...
      }
      else
      {
         if ( id.lastIndexOf( "_name_fld" ) > 0 )  // workaround for names having an ampersand in them
         {
            var rExp = /&/g;
            val = val.replace( rExp, "&amp;" );            
         }
         Elem.innerHTML = val;
      }
     }
}

////////////////////////////////////////////////////////////////
function Field( name, val )
{
   this.name = name || "";
   this.val  = val || "";
}
Field.prototype = new Field;

////////////////////////////////////////////////////////////////
function put_values( arr )
{
   //alert( " << " + comp_arr + " >> " );

   var tables_arr = arr.split( "<==@==>" );
   var i_t = 0;

   for ( i_t = 0; i_t < tables_arr.length; i_t++ )
   {
      var tname_rec = tables_arr[ i_t ].split( "<^^@^^>" );

      Tables[ tname_rec[ 0 ] ] = new Array();

      var comp_arr = tname_rec[ 1 ] ? tname_rec[ 1 ].split( "<__@__>" ) : "";
      var id_val = "";
      var i = 0;
   
      for ( i = 0;  i < comp_arr.length; i++ )
      {
        id_val = comp_arr[ i ].split( "<~~@~~>" );
   //alert( " << " + id_val[0] + " | " + id_val[1] + " >> " );
        var Elem = get( id_val[ 0 ] );
   
        if ( id_val[ 0 ] == "password_fld" )
        {
           id_val[ 1 ] = decode_pwd( get( "user_name_fld" ).value, id_val[ 1 ] );
           put_value( get( "password_ver_fld" ), "password_ver_fld", id_val[ 1 ] );
        }

        // Form field name/field value pair
        // and add it to Tables array
        Tables[ tname_rec[ 0 ] ][ id_val[ 0 ] ] = id_val[ 1 ];
   
        put_value( Elem, id_val[ 0 ], id_val[ 1 ] );
   
        Elem = get( id_val[ 0 ] + "_ro" );
   
        put_value( Elem, id_val[ 0 ], id_val[ 1 ] );
   
   //alert( "Field:<<" + id_val[ 0 ] + ">> Value:<<" + id_val[ 1 ] + ">>" );
   //       if ( id_val[ 0 ].lastIndexOf( "_chk_fld" ) > 0 )
   //       Elem.checked = 1;
       }


    }

    check_ro_fields(); // second language
}

////////////////////////////////////////////////////////////////
function view_search( l_hto, skoko, skuda, shukaj, sid )
{
  var src = cgi_path + ( l_hto > 0 ? ( "view_search.pl?" + l_hto + "=" + skoko + "=" + skuda + "=" + shukaj + "=" + ( sid ? sid:"" ) ) :
                                     ( "news_search.pl?" + l_hto*(-1) + "=" + skoko + "=" + skuda + "=" + shukaj + "=" + ( sid ? sid:"" ) )
                       );

  //alert( "src=" + src + "sid=" + sid + "; num_pages = " + num_pages + "; cur_page = " + cur_page );
  var body = document.getElementsByTagName( 'body' ).item( 0 );
  var previous = get( 'loadedScript4' );

  var passed = true;

  if ( passed )
  {  
     remove( previous );

     script = document.createElement( 'script' );
     script.src = src;
     script.type = 'text/javascript';
     script.id = 'loadedScript4';
     script.defer = true;
     body.appendChild( script );
     //setTimeout( "dummy()", 1000 );
  }
}

////////////////////////////////////////////////////////////////
function get_countriesJS( l_hto )
{
  var src = cgi_path + "get_countriesJS.pl?" + l_hto + "=" + l_hto + "=" + l_hto;

  //alert( "num_pages = " + num_pages + "; cur_page = " + cur_page );
  var body = document.getElementsByTagName( 'body' ).item( 0 );
  var previous = get( 'loadedScript6' );

  var passed = true;

  if ( passed )
  {  
     remove( previous );

     script = document.createElement( 'script' );
     script.src = src;
     script.type = 'text/javascript';
     script.id = 'loadedScript6';
     script.defer = true;
     body.appendChild( script );
     //setTimeout( "dummy()", 1000 );
  }
}

////////////////////////////////////////////////////////////////
function get_categoriesJS( l_hto )
{
  var src = cgi_path + "get_categoriesJS.pl?" + l_hto + "=" + l_hto + "=" + l_hto;

  //alert( "num_pages = " + num_pages + "; cur_page = " + cur_page );
  var body = document.getElementsByTagName( 'body' ).item( 0 );
  var previous = get( 'loadedScript7' );

  var passed = true;

  if ( passed )
  {  
     remove( previous );

     script = document.createElement( 'script' );
     script.src = src;
     script.type = 'text/javascript';
     script.id = 'loadedScript7';
     script.defer = true;
     body.appendChild( script );
     //setTimeout( "dummy()", 1000 );
  }
}

////////////////////////////////////////////////////////////////
function get_valuesJS( l_hto, uid, sid, edit )
{
  var src = cgi_path + "get_valuesJS.pl?" + l_hto + "=" + uid + "=" + sid + "=" + ( is_defined( edit ) ? edit : "" );

  if ( !uid && !sid )
  {
     alert( "Please type correct Account ID and password" );
     return( false );
  }

  if ( get_valuesJS.arguments.length > 3 )
     src = cgi_path + "get_valuesJS.pl?" + l_hto + "=" + uid + "=" + sid + "=" + sid + "=" + l_hto + "=" + sid;

  var body = document.getElementsByTagName( 'body' ).item( 0 );
  var previous = get( 'comp_full_view' );

  remove( previous );

  script = document.createElement( 'script' );
  script.src = src;
  script.type = 'text/javascript';
  script.id = 'comp_full_view';
  script.defer = true;
  body.appendChild( script );
  //setTimeout( "dummy()", 1000 );
}

////////////////////////////////////////////////////////////////
//function put_session( sid )
//{
//   sid_global = sid;
//   alert( "$valArray[0], $valArray[1], $sid, $id" );
//}

////////////////////////////////////////////////////////////////
function get_sessionJS( sid, uid, edit )
{
/*  var src = "http:///cgi-bun/get_sessionJS.pl?" + sid + "=" + uid + "=" + sid + "=" + uid;

  var body = document.getElementsByTagName( 'body' ).item( 0 );
  var previous = get( 'get_session' );

  var passed = true;

  if ( passed )
  {  
     remove( previous );

     script = document.createElement( 'script' );
     script.src = src;
     script.type = 'text/javascript';
     script.id = 'get_session';
     script.defer = true;
     body.appendChild( script );

alert( "Podcepil" );

     setTimeout( "dummy()", 1000 );
  }
*/
}

////////////////////////////////////////////////////////////////
function view_search_comp_test( skoko, skuda, shukaj )
{
  var src = "/cgi-bin/view_search_comp_test.pl?" +
            skoko + "=" + skuda + "=" + shukaj;

  var body = document.getElementsByTagName( 'body' ).item( 0 );
  var previous = get( 'loadedScript5' );

  var passed = true;

  if ( passed )
  {  
     remove( previous );

     script = document.createElement( 'script' );
     script.src = src;
     script.type = 'text/javascript';
     script.id = 'loadedScript5';
     script.defer = true;
     body.appendChild( script );
     //setTimeout( "dummy()", 1000 );
  }
}


////////////////////////////////////////////////////////////////
function check_user_name_test( field, fail_if_exist )
{
  var src = cgi_path + "validateJS_test.pl?"
            + field.name + "=" + field.value + "=" + fail_if_exist;
  var body = document.getElementsByTagName( 'body' ).item( 0 );
  var previous = get( 'loadedScript' );

  var passed = true;

//  if ( fail_if_exist == 1 || fail_if_exist == 3 ) // ID (name) is checked for duplicate
//     passed = validate_uid_pwd_field( field, "ID" );

  if ( passed )
  {  
     remove( previous );

     script = document.createElement( 'script' );
     script.src = src;
     script.type = 'text/javascript';
     script.id = 'loadedScript';
     script.defer = true;
     body.appendChild( script );
     setTimeout( "dummy()", 1000 );
  }
}


////////////////////////////////////////////////////////////////
function dummy()
{
  return( 2567 ); // the dummiest code for dumbiest browsers
}


////////////////////////////////////////////////////////////////
function ch_color( item_, color )
{
   item_.style.color = color;
}


////////////////////////////////////////////////////////////////
function put_status( msg )
{
  var dest;

  if ( ie5 )  // and ns6, actually
  {
  // this is the way the standards work
     dest = get( "_pustyha" );
  }
  else if ( ie4 )
  {
  // this is the way old msie versions work
     dest = document.all[ "_pustyha" ];
  }
  else if ( ( is_defined( ns4 ) && ns4 ) )
  {
     // this is the way nn4 works
     dest = document.layers[ "_pustyha" ];
  }
  if ( dest )
     dest.innerHTML = msg;
}

////////////////////////////////////////////////////////////////
function put_status2( msg )
{
  var dest;

  if ( ie5 )  // and ns6, actually
  {
  // this is the way the standards work
     dest = get( "_pustyha2" );
  }
  else if ( ie4 )
  {
  // this is the way old msie versions work
     dest = document.all[ "_pustyha2" ];
  }
  else if ( ( is_defined( ns4 ) && ns4 ) )
  {
     // this is the way nn4 works
     dest = document.layers[ "_pustyha2" ];
  }

  if ( dest )
     dest.innerHTML = msg;
}

////////////////////////////////////////////////////////////////
function put_status3( msg )
{
  var dest;

  if ( ie5 )  // and ns6, actually
  {
  // this is the way the standards work
     dest = get( "_pustyha3" );
  }
  else if ( ie4 )
  {
  // this is the way old msie versions work
     dest = document.all[ "_pustyha3" ];
  }
  else if ( ( is_defined( ns4 ) && ns4 ) )
  {
     // this is the way nn4 works
     dest = document.layers[ "_pustyha3" ];
  }

  if ( dest )
     dest.innerHTML = msg;
}

////////////////////////////////////////////////////////////////
function put_status_sh_name( msg )
{
  var dest;

  if ( ie5 )  // and ns6, actually
  {
  // this is the way the standards work
     dest = get( "_pustyha_sh_name" );
  }
  else if ( ie4 )
  {
  // this is the way old msie versions work
     dest = document.all[ "_pustyha_sh_name" ];
  }
  else if ( ( is_defined( ns4 ) && ns4 ) )
  {
     // this is the way nn4 works
     dest = document.layers[ "_pustyha_sh_name" ];
  }

  if ( dest )
     dest.innerHTML = msg;
}


////////////////////////////////////////////////////////////////
// This script and many more are available free online at
// The JavaScript Source!! http://javascript.internet.com

// V1.1.3: Sandeep V. Tamhankar (stamhankar@hotmail.com)
// Original:  Sandeep V. Tamhankar (stamhankar@hotmail.com)
// Changed alert() to put_status2().  --DVG, Jun, 2005

/* 1.1.4: Fixed a bug where upper ASCII characters (i.e. accented letters
international characters) were allowed.

1.1.3: Added the restriction to only accept addresses ending in two
letters (interpreted to be a country code) or one of the known
TLDs (com, net, org, edu, int, mil, gov, arpa), including the
new ones (biz, aero, name, coop, info, pro, museum).  One can
easily update the list (if ICANN adds even more TLDs in the
future) by updating the knownDomsPat variable near the
top of the function.  Also, I added a variable at the top
of the function that determines whether or not TLDs should be
checked at all.  This is good if you are using this function
internally (i.e. intranet site) where hostnames don't have to 
conform to W3C standards and thus internal organization e-mail
addresses don't have to either.
Changed some of the logic so that the function will work properly
with Netscape 6.

1.1.2: Fixed a bug where trailing . in e-mail address was passing
(the bug is actually in the weak regexp engine of the browser; I
simplified the regexps to make it work).

1.1.1: Removed restriction that countries must be preceded by a domain,
so abc@host.uk is now legal.  However, there's still the 
restriction that an address must end in a two or three letter
word.

1.1: Rewrote most of the function to conform more closely to RFC 822.

1.0: Original  */

function emailCheck (emailStr) {

/* The following variable tells the rest of the function whether or not
to verify that the address ends in a two-letter country or well-known
TLD.  1 means check it, 0 means don't. */

var checkTLD=1;

/* The following is the list of known TLDs that an e-mail address must end with. */

var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;

/* The following pattern is used to check if the entered e-mail address
fits the user@domain format.  It also is used to separate the username
from the domain. */

var emailPat=/^(.+)@(.+)$/;

/* The following string represents the pattern for matching all special
characters.  We don't want to allow special characters in the address. 
These characters include ( ) < > @ , ; : \ " . [ ] */

var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";

/* The following string represents the range of characters allowed in a 
username or domainname.  It really states which chars aren't allowed.*/

var validChars="\[^\\s" + specialChars + "\]";

/* The following pattern applies if the "user" is a quoted string (in
which case, there are no rules about which characters are allowed
and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
is a legal e-mail address. */

var quotedUser="(\"[^\"]*\")";

/* The following pattern applies for domains that are IP addresses,
rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
e-mail address. NOTE: The square brackets are required. */

var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;

/* The following string represents an atom (basically a series of non-special characters.) */

var atom=validChars + '+';

/* The following string represents one word in the typical username.
For example, in john.doe@somewhere.com, john and doe are words.
Basically, a word is either an atom or quoted string. */

var word="(" + atom + "|" + quotedUser + ")";

// The following pattern describes the structure of the user

var userPat=new RegExp("^" + word + "(\\." + word + ")*$");

/* The following pattern describes the structure of a normal symbolic
domain, as opposed to ipDomainPat, shown above. */

var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");

/* Finally, let's start trying to figure out if the supplied address is valid. */

/* Begin with the coarse pattern to simply break up user@domain into
different pieces that are easy to analyze. */

var matchArray=emailStr.match(emailPat);

if (matchArray==null) {

/* Too many/few @'s or something; basically, this address doesn't
even fit the general mould of a valid e-mail address. */

put_status2("Email address seems incorrect (check @ and .'s)");
return false;
}
var user=matchArray[1];
var domain=matchArray[2];

// Start by checking that only basic ASCII characters are in the strings (0-127).

for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {
put_status2("Ths e-mail username contains invalid characters.");
return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
put_status2("Ths e-mail domain name contains invalid characters.");
return false;
   }
}

// See if "user" is valid 

if (user.match(userPat)==null) {

// user is not valid

put_status2("The e-mail username doesn't seem to be valid.");
return false;
}

/* if the e-mail address is at an IP address (as opposed to a symbolic
host name) make sure the IP address is valid. */

var IPArray=domain.match(ipDomainPat);
if (IPArray!=null) {

// this is an IP address

for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
put_status2("Destination IP address is invalid!");
return false;
   }
}
return true;
}

// Domain is symbolic name.  Check if it's valid.
 
var atomPat=new RegExp("^" + atom + "$");
var domArr=domain.split(".");
var len=domArr.length;
for (i=0;i<len;i++) {
if (domArr[i].search(atomPat)==-1) {
put_status2("The e-mail domain name does not seem to be valid.");
return false;
   }
}

/* domain name seems valid, but now make sure that it ends in a
known top-level domain (like com, edu, gov) or a two-letter word,
representing country (uk, nl), and that there's a hostname preceding 
the domain or country. */

if (checkTLD && domArr[domArr.length-1].length!=2 && 
domArr[domArr.length-1].search(knownDomsPat)==-1) {
put_status2("The e-mail address must end in a well-known domain or two letter " + "country.");
return false;
}

// Make sure there's a host name preceding the domain.

if ( len < 2 )
{
   put_status2( "This address is missing a hostname!" );
   return( false );
}

// If we've gotten this far, everything's valid!
put_status2( "" );
return true;
}


////////////////////////////////////////////////////////////////
function is_empty( item_ )
{
   var ret = 0;

   if ( !get( item_ ) || get( item_ ).value == '' )
      ret = 1;

   return( ret );
}    


////////////////////////////////////////////////////////////////
function setreadonly( item_, val )
{
//get( item_ ).readOnly = val;
//get( "toolTipLayer" ).innerHTML = content;

  var elem_ = get( item_ );

  if ( elem_ )
  {
     if ( val )
     {
//      elem.selected = 0;
        if ( elem_.type == 'radio' )
           elem_.checked = 0;
        else if ( elem_.type == 'text' )
           elem_.value = "";
     }

     if ( elem_.type == 'radio' )
        elem_.disabled = val;
     else if ( elem_.type == 'text' )
        elem_.readOnly = val;
  }
}


////////////////////////////////////////////////////////////////
function chk_radio_access( text1, radio1, radio2 )
{
   if ( is_empty( text1 ) )
   { 
      setreadonly( radio1, 1 );
      setreadonly( radio2, 1 );
   } 
   else 
   {
      setreadonly( radio1, 0 );
      setreadonly( radio2, 0 );
   }
}

////////////////////////////////////////////////////////////////
function setreadonly2( item_, val )
{
  var form_obj = document.forms[ item_ + "_form" ];
  var j = 0;

  for ( j = 0; form_obj && j < form_obj.elements.length; j++ )
  {
     var Elem = form_obj.elements[ j ];
     if ( Elem && Elem.type == "radio" )
     {
        Elem.disabled = val;
        if ( val )
           Elem.checked = 0;
     }
  }
}

////////////////////////////////////////////////////////////////
function chk_radio_access2( text1, radio )
{
   if ( is_empty( text1 ) )
      setreadonly2( radio, 1 );
   else 
      setreadonly2( radio, 0 );
}

////////////////////////////////////////////////////////////////
function chk_input_access( text1, input1, input2 )
{
   if ( is_empty( text1 ) )
   { 
      setreadonly( input1, 1 );
      setreadonly( input2, 1 );
   } 
   else 
   {
      setreadonly( input1, 0 );
      setreadonly( input2, 0 );
   }
}

////////////////////////////////////////////////////////////////
function chk_numeric( event_ )
{
   var keyCode = (( is_defined( ns4 ) && ns4 )||ns6) ? event_.which : event_.keyCode;
   var ret = true;
   
   event_.returnValue = true;

   if ( keyCode == null || keyCode == 0  || keyCode == 8 ||
        keyCode == 9    || keyCode == 13 || keyCode == 27
      )
   {
      ret = true;
   }
   else if ( keyCode < 45 || keyCode > 57 )
   {
      event_.returnValue = false;
      ret = false;
   }

   return( ret );
}

////////////////////////////////////////////////////////////////
function enc_pwd( unm, pwd )
{
  var ss = ( unm && unm.value ) ? ( unm.value.substring( 0, 1 ) == "_" ? unm.value.substring( 1, 2 ) : unm.value.substring( 0, 1 ) ) : "";
  ss += ss;

  var enc_p = ( pwd && pwd.value && ss && ( ss.length > 1 ) ) ? 
                Javacrypt.displayPassword( ss, pwd.value ) +
                ( ( pwd.value.length < 9 ) ? "" : Javacrypt.displayPassword( ss, pwd.value.substring( 8, pwd.value.length ) ) )
                :
              "";
//alert( enc_p + " " + ss + " " + pwd.value.substring( 8, pwd.value.length ) );
  return( enc_p );
}

////////////////////////////////////////////////////////////////
function log_in( arr )
{
   var comp_arr = arr.split( "<__@__>" );
   var i        = 0;
   var ref      = "";

//   for ( i = 0;  i < comp_arr.length; i++ )
//   {
//      if ( ref = get( comp_arr[ i*2 ] ) )
//         ref.href = comp_arr[ i*2 + 1 ];
//   }   

//   alert( comp_arr );
//   if ( ns4 )
//      document.history.go( 0 );

   if ( arr )
   {
      if ( comp_arr[ 0 ].indexOf( 'err' ) < 0 )
         window.location.replace( 'http://www.itechbridge.com/presentation/' + comp_arr[ 0 ] + '?uid=' + comp_arr[ 1 ] + '&sid=' + comp_arr[ 2 ] );
      else
      {
        if ( comp_arr[ 0 ].indexOf( 'err2' ) < 0 )
        {
         help_str = "For an instruction, please read the topic on iTech Bridge\'s Customer Support>Help forum";

         if ( comp_arr[ 0 ].indexOf( 'comp' ) >= 0 )
            err_str = "Sorry, there is no your Company Profile in the Yellow Pages.\n You have only your personal \(Specialist\) Profile.\n" + help_str;
         else if ( comp_arr[ 0 ].indexOf( 'spec' ) >= 0 )
            err_str = "Sorry, there is no your personal \(Specialist\) Profile in the Yellow Pages.\n You have only your Company Profile.\n" + help_str;
         else if ( comp_arr[ 0 ].indexOf( 'acco' ) >= 0 )
            err_str = "Sorry, you don't have an account yet.\n" + help_str;
         }
         else
            err_str = "Please update your account first for security reasons.";

         alert( err_str );
      }
   }
   else
      alert( "Please type correct Account ID and password" );
}

////////////////////////////////////////////////////////////////
function log_off()
{
   var comp_arr = new Array( "account", "profile", "company",
                             "team", "clients", "projcts",
                             "claims" );
   var edit_view = new Array( "edit", "view" );

   var i   = 0;
   var j   = 0;
   var ref = "";

   for ( i = 0;  i < comp_arr.length; i++ )
    for ( j = 0; j < edit_view.length; j++ )
   {
      if ( ref = get( comp_arr[ i ] + '_' + view_edit[ j ] ) )
         ref.href = "javascript:void_func()";
   }   


}

////////////////////////////////////////////////////////////////
function loginJS( obj_id, dwnld, obj_type, o_crc )
{
  var uname = get( 'user_name_fld' );
  var pwd   = enc_pwd( uname, get( 'password_fld' ) );

  if ( !obj_type )
     obj_type = -1;


  //alert( pwd + " " + uname.value + " " + obj_id );
  if ( dwnld || ( uname && uname.value && pwd ) || ( SeID && SeID != "" ) )
  {
     var src = cgi_path + "loginJS.pl?" + ( uname ? uname.value : "" ) + "=" + pwd + "=" + obj_id + "=" + SeID + "=" + obj_type + "=" + ( o_crc ? o_crc : "" );

     var body = document.getElementsByTagName( 'body' ).item( 0 );
     var previous = get( 'login' );

     remove( previous );

     script = document.createElement( 'script' );
     script.src = src;
     script.type = 'text/javascript';
     script.id = 'login';
     script.defer = true;
     body.appendChild( script );
  }
  else
    alert( "Please type Account ID and password" );
}

////////////////////////////////////////////////////////////////
function logoffJS( obj_id )
{
  if ( SeID && SeID != "" )
  {
     var src = cgi_path + "logoffJS.pl?" + obj_id + "=" + SeID;

     var body = document.getElementsByTagName( 'body' ).item( 0 );
     var previous = get( 'logoff' );

     remove( previous );

     script = document.createElement( 'script' );
     script.src = src;
     script.type = 'text/javascript';
     script.id = 'logoff';
     script.defer = true;
     body.appendChild( script );
  }

  location.search="";
}

////////////////////////////////////////////////////////////////
function comp_or_team( form, edit )
{
  var form_name = form + "_fld_form";
  var i = 0;
  var form_obj = document.forms[ form_name ];
  var ret_comp_or_team = 1;
  var title = "iTech Bridge-Pilot Edition: Yellow Pages: Compan";
//  var text = new Array( "Team", "Team" );
//  alert( title );

  for ( i = 0; form_obj && i < form_obj.elements.length; i++ )
  {
      var Elem = form_obj.elements[ i ];
      if ( Elem.type == "radio" && Elem.checked == 1 )
         ret_comp_or_team = Elem.value;
  }

  if ( ret_comp_or_team > 1 )
  {
     title = "iTech Bridge-Pilot Edition: Yellow Pages: Team";
     get( 'company_team0' ).innerHTML = edit ? "My Team" : "Team";
     get( 'company_team1' ).innerHTML = "Team";
  }

  document.title = title + ( edit ? ( ( ret_comp_or_team > 1 ) ? " Profile" : "y Profile" ) : 
                                    ( ( ret_comp_or_team > 1 ) ? "s" : "ies" ) );
}

////////////////////////////////////////////////////////////////
function pwd( line1, line2 )
{
   var ret = "";
   var ss  = line1.substring( 0, 1 ) == "_" ? line1.substring( 1, 2 ) : line1.substring( 0, 1 );
   ss += ss;
   var i = 0;

   for ( i = 0; i < line2.length; i++ )
      ret += Javacrypt.displayPassword( ss, line2.substring( i, i+1 ) );

//   alert( line2.length + ' ' + i + ' ' + ret );

   return( ret );
}

////////////////////////////////////////////////////////////////
function tryitJS()
{
  var uname = get( 'user_name_fld' ).value;
  var pwd_s = get( 'password_fld' ).value;



//  alert( pwd + " " + uname.value + " " + obj_id );
  if ( uname && pwd_s )
  {
     var epwd = pwd( uname, pwd_s );

     //alert( uname + "\n " + epwd + "\n " + pwd_s );
     var src = cgi_path + "tryitJS.pl?" + uname + "\<__@__\>" + epwd;

     var body = document.getElementsByTagName( 'body' ).item( 0 );
     var previous = get( 'passwd' );

     remove( previous );

     script = document.createElement( 'script' );
     script.src = src;
     script.type = 'text/javascript';
     script.id = 'passwd';
     script.defer = true;
     body.appendChild( script );
  }
}


////////////////////////////////////////////////////////////////
function get_radio_val( Obj )
{
  var ret = "";

  if ( Obj.id && Obj.id.lastIndexOf( "_fld" ) > 0 )
  {
     if ( Obj.type == "radio" )
     {
        var form_obj = document.forms[ Obj.id + "_form" ];
        var j = 0;

        for ( j = 0; form_obj && j < form_obj.elements.length; j++ )
        {
           var Elem = form_obj.elements[ j ];
           if ( Elem.type == "radio" && Elem.checked == 1 )
              ret = Elem.value;
        }
     }
  }

  return( ret );
}

////////////////////////////////////////////////////////////////
function acc_updateJS( old_uname )
{
  var uname = get( 'user_name_fld' ).value;
  var pwd_o = get( 'password_fld' );
  var pwd_s = pwd_o ? pwd_o.value : "";

/*  var fields = new Array( "user_name_fld", "password_fld", "screen_name_fld",
                          "email_fld", "country_fld", "contact_method_fld" );
*/

  if ( uname && pwd_s )
  {
     pwd_o.maxLength = 200;
     pwd_o.value = pwd( uname, pwd_s );
  }

  pwd_o = get( 'password_ver_fld' );
  pwd_s = pwd_o.value;

  if ( uname && pwd_s )
  {
     pwd_o.maxLength = 200;
     pwd_o.value = pwd( uname, pwd_s );
  }


  if ( uname && pwd_s )
  {
     var pairs = "";
     var pairs_alt = "";
     var i = 0;

/*     for ( i = 0; i < fields.length; i++ )
     {
        var Obj = get( fields[ i ] );

        if ( Obj ) // && Obj.id && Obj.id.lastIndexOf( "_fld" ) > 0 ) // Put it
        {

           if ( Obj.type == "radio" )
              Obj.value = get_radio_val( Obj );

           pairs += Obj.id.substring( 0, Obj.id.length - 4 ); // field name
           pairs += "<~~\@~~>";
           pairs += Obj.value;

           pairs += "<--\@-->";
        }
     }
*/
     var All = ns6 ? document.getElementsByTagName( "*" ) : document.all;

     for ( i = 0; i < All.length; i++ )
     {
        var Obj = All[ i ];

        if ( Obj && Obj.id && Obj.id.lastIndexOf( "_fld" ) > 0 ) // Put it
        {

           if ( ( Obj.type == "radio" && Obj.checked ) || Obj.type != "radio" )
           {
              pairs_alt += Obj.id.substring( 0, Obj.id.length - 4 ); // field name
              pairs_alt += "<~~\@~~>";
              pairs_alt += Obj.value;

              pairs_alt += "<--\@-->";
           }
        }
     }
     pairs = pairs_alt;
     
//  alert( pairs + "\n" + pairs_alt );

     var src = cgi_path + "acc_updateJS.pl?" + uname + "<__\@__>" + pairs + "<__\@__>" + old_uname;

     var body = document.getElementsByTagName( 'body' ).item( 0 );
     var previous = get( 'acc_update' );

     remove( previous );

     script = document.createElement( 'script' );
     script.src = src;
     script.type = 'text/javascript';
     script.id = 'acc_update';
     script.defer = true;
     body.appendChild( script );
  }
}


////////////////////////////////////////////////////////////////
function decode_pwd( uname, epwd )
{
    var ss = uname.substring( 0, 1 ) == "_" ? uname.substring( 1, 2 ) : uname.substring( 0, 1 );
    ss += ss;

    var ret = "";
    var i   = 0;
    var j   = 0;

    var abc = new Array( 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
                         'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
                         '.','/','_','0','1','2','3','4','5','6','7','8','9' );
    var dec = new Array();

    
    //alert( epwd );

    for ( i = 0; i < abc.length; i++ ) 
       dec[ i ] = Javacrypt.displayPassword( ss, abc[ i ] ).substring( 2 );

    var tok_len = 13;
 
    var epwd_arr = new Array( epwd.length / tok_len ); // doesn't work in all cases !!! epwd.split( ss );

    for ( i = 0; i < epwd_arr.length; i++ )
        epwd_arr[ i ] = epwd.substring(  i * tok_len + 2, i * tok_len + 2 + tok_len - 2 );

    for ( i = 0; i < epwd_arr.length; i++ )
    {
       for ( j = 0; ( ( epwd_arr[ i ] && dec[ j ] ) && ( epwd_arr[ i ] != dec[ j ] ) ) && ( j < abc.length ); j++ );

       if ( j < abc.length )
          ret += abc[ j ];
    }

    //alert( ret );

    return( ret );
}

////////////////////////////////////////////////////////////////
function update_combined_fields()
{
}

////////////////////////////////////////////////////////////////
function get_pairs()
{
  /*var make it global*/ pairs = "";

  for ( var i in Tables )
  {
      pairs += i +  "<^^\@^^>";
      for ( var j in Tables[ i ] )
      {
         pairs += j + "<~~\@~~>" + Tables[ i ][ j ] + "<--\@-->";
      }
      pairs = pairs.substring( 0, pairs.length - 7 );
      pairs += "<==\@==>";
  }

  pairs = pairs.substring( 0, pairs.length - 7 );

  /*return( pairs );*/
}

////////////////////////////////////////////////////////////////
function find_table_name( papa )
{
   while ( papa && ( !papa.id || papa.id.lastIndexOf("_tbl") < 0 ) )
     papa = papa.parentNode;

   return( papa && papa.id ? papa.id.substring( 0, papa.id.length - 4 ) : "" );
}

var cur_chunk = 1;
var chunk_len = 1536;
var src;
var n_chunks;
var pairs;
var g_intervalID;

////////////////////////////////////////////////////////////////
function chunk_incr()
{
//  cur_chunk++;
  prof_updating();
}

////////////////////////////////////////////////////////////////
function prof_updateJS( sid, mode )
{
     var i = 0;

     var All = ns6 ? document.getElementsByTagName( "*" ) : document.all;

     for ( i = 0; i < All.length; i++ )
     {
        var Obj = All[ i ];
        var is_fld = Obj && Obj.id && ( Obj.id.lastIndexOf( "_fld" ) == Obj.id.length - 4 //_fld;
                                        ||
                                        Obj.id.lastIndexOf( "_fld" ) == Obj.id.length - 5 ); //_fld1..9;

        if ( is_fld ) // Put it
        {
           var table_name = find_table_name( Obj.parentNode );

           if ( ( Obj.type == "radio" && Obj.checked ) || Obj.type != "radio" )
           {
              if ( Obj.type == "checkbox" )
                 Obj.value = Obj.checked ? 1 : 0;

              //pairs += Obj.id; // field name, deal with _fld inside
              //pairs += "<~~\@~~>";
              //pairs += Obj.value;

              //pairs += "<--\@-->";

              if ( table_name )
                 Tables[ table_name ][ Obj.id ] = Obj.value;
           }
        }
     }

     update_combined_fields();

     /*pairs =*/ get_pairs();

//     var rExp = /&/g;
//     pairs = pairs.replace( rExp, "%26" );            
//     rExp = /#/g;
//     pairs = pairs.replace( rExp, "%23" );            
     pairs = encodeURIComponent( pairs );            
     
     
//  alert( pairs.length + " " + pairs );

     src       = cgi_path + "prof_updateJS.pl?" + sid + "<__\@__>" + mode;

     n_chunks  = parseInt( pairs.length / chunk_len );

     if ( pairs.length % chunk_len )
        n_chunks++;

//    for ( cur_chunk = 1; cur_chunk <= n_chunks; cur_chunk++ )
//    {
//        prof_updating( src, n_chunks, cur_chunk, pairs.substring( chunk_len * (cur_chunk - 1 ), chunk_len * (cur_chunk - 1 ) + chunk_len ) );
//    }
     cur_chunk = 1;
//var loc_cur_chunk = cur_chunk;

//    for ( cur_chunk = 1; cur_chunk <= n_chunks; loc_cur_chunk = cur_chunk /*cur_chunk++*/ )
//    {
//       var body     = document.getElementsByTagName( 'body' ).item( 0 );
//      var previous = get( 'prof_update' );

     //remove( previous );

     var butn = get( "ok" );
     butn.disabled = true;
     butn = get( "update" );
     butn.disabled = true;
     
     prof_updating();

//       while ( loc_cur_chunk == cur_chunk );
//    }
//window.setTimeout( "prof_updating();", 300 );
//  g_intervalID = setInterval( prof_updating, 400 );
}

////////////////////////////////////////////////////////////////////////////
function prof_updating()
{
  var krutilki = new Array( "-", "\\", "|", "/" );
  var Krutilka = get( 'krutilka' );
  var body     = document.getElementsByTagName( 'body' ).item( 0 );
  var previous = get( 'prof_update' );

  remove( previous );

  if ( cur_chunk <= n_chunks )
  {
        script = document.createElement( 'script' );
        script.src = src + "<__\@__>" + 
                     n_chunks + "<__\@__>" + 
                     cur_chunk + "<__\@__>" + 
                     pairs.substring( chunk_len * (cur_chunk - 1 ), chunk_len * (cur_chunk - 1 ) + chunk_len );
        cur_chunk++;

        script.type = 'text/javascript';
        script.id = 'prof_update';
        script.defer = true;
        body.appendChild( script );
        if ( Krutilka )
           Krutilka.innerHTML = krutilki[ cur_chunk % 4 ];
//        if ( ie5 )
//           setTimeout( "dummy();", 300 );
//        window.setTimeout( "prof_updating();", 300 );
   }
   else
        if ( Krutilka )
           Krutilka.innerHTML = "";
//           clearInterval( g_intervalID );
}

////////////////////////////////////////////////////////////////
function get_SeID( sid, init_new, uid )
{
  var src = cgi_path + "sess_cgi_id_getJS.pl?"
            + "SeID" + "=" + sid + "=" + init_new + "=" + uid;
  var body = document.getElementsByTagName( 'body' ).item( 0 );
  var previous = get( 'get_SeID_sc' );

  remove( previous );

  script = document.createElement( 'script' );
  script.src = src;
  script.type = 'text/javascript';
  script.id = 'get_SeID_sc';
  script.defer = true;
  body.appendChild( script );
  setTimeout( "dummy()", 1000 );
}

////////////////////////////////////////////////////////////////
function on_m_over()
{
 status="aaa";
}

////////////////////////////////////////////////////////////////
function show_refs()
{
  if ( SeID != "" )
  for (i=0; i < document.links.length; i++)
  {
     lnk = document.links[i].href;
     //alert( lnk );
     if ( lnk && lnk != "" &&
          lnk.indexOf( 'javascript' ) != 0 && lnk.indexOf( 'mailto' ) != 0 )
     {
        document.links[i].href = document.links[i].href +
                                 ( lnk.indexOf( '?' ) >= 0 ? '&' : '?' ) +
                                 'sid=' + SeID; 
        if ( lnk.indexOf( '_sample' ) >= 0 )
           document.links[i].href = document.links[i].href.substring( 0, lnk.indexOf( '_sample' ) ) + '_download' +
                                    document.links[i].href.substring( lnk.indexOf( '_sample' ) + 7 ); 
     }
/*
     if ( lnk )
     {
        document.links[i].onMouseOver = "on_m_over();return true";
        document.links[i].onMouseOut  = "window.status='bbb'";
        if ( i == 27 )
           alert( document.links[i].outerHTML );
     }
*/
  }
}

////////////////////////////////////////////////////////////////
function login_or_not_login()
{
  if ( SeID )
  {
     var lg = get( 'ITB_Login' );
     
     if ( lg )
        lg.innerHTML = '<table cols="2" rows="2">' +
                       '<tr>' +
                       '<td align="left">' +
                       '<input type="button" id="Logoff" value="Logoff" ' +
                       'onClick="javascript:logoffJS( \'get_sid\' )"/></td>' +
                       '</tr>' +
                       '<tr>' +
                       '<span style=\'color:#CC3300\'>' +
                       'You was successfully logged in.  Please use links below to access your data.' +
                       '</span>' +
                       '</tr>' +
                       '</table>';
  }
}

////////////////////////////////////////////////////////////////
function get_cur_sid()
{
   return( SeID );
}

////////////////////////////////////////////////////////////////
function set_cur_sid( cur_sid )
{
   SeID = cur_sid;
}

////////////////////////////////////////////////////////////////
function remove( node )
{
  if ( node )
     node.parentNode.removeChild( node );
}

////////////////////////////////////////////////////////////////
function set_SeID_( sid )
{
     var cur_sid = get_cur_sid();

     if ( sid && sid != "" && sid != cur_sid )
     {
        set_cur_sid( sid );
        location.search = "?sid=" + sid;
     }
     else if ( !sid || sid == "" )
     {
        set_cur_sid( sid ? sid : "" );
        var un = get( 'user_name_fld' );
        if ( un )
           un.value = "";
        location.search = "";
     }
     show_refs();
     login_or_not_login();
}

////////////////////////////////////////////////////////////////
function contactusJS( name, email, phone, comments )
{
  name     = name.value;
  email    = email.value;
  phone    = phone && phone.value ? phone.value : "no_phone";
  comments = comments.value;

  var src = cgi_path + "contactus.pl?" + encodeURIComponent( name )  + "<__@__>" +
                                         encodeURIComponent( email ) + "<__@__>" +
                                         encodeURIComponent( phone ) + "<__@__>" +
                                         encodeURIComponent( comments );

  var body = document.getElementsByTagName( 'body' ).item( 0 );
  var previous = get( 'contactusScript' );

  remove( previous );

  script = document.createElement( 'script' );
  script.src = src;
  script.type = 'text/javascript';
  script.id = 'contactusScript';
  script.defer = true;
  body.appendChild( script );
}


////////////////////////////////////////////////////////////////
function set_up( uname, pwd )
{
  if ( uname )
     set( 'user_name_fld', uname );

  if ( pwd )
     set( 'password_fld', pwd );

  if ( uname && pwd )
     loginJS( 'get_sid' );
}

////////////////////////////////////////////////////////////////
function set_crc( val )
{
  crc = val;
}

////////////////////////////////////////////////////////////////
function get_crc()
{
  return( crc );
}

////////////////////////////////////////////////////////////////
function set_init_crc( val )
{
  init_crc = val;
}

////////////////////////////////////////////////////////////////
function get_init_crc()
{
  if ( init_crc == 69 )
     return( init_crc );
  else
     set_init_crc( 0 );
}

////////////////////////////////////////////////////////////////
function getpostJS( pid )
{
  var src = cgi_path + "getpost.pl?" + encodeURIComponent( pid );

  var body = document.getElementsByTagName( 'body' ).item( 0 );
  var previous = get( 'getpostScript' );

  remove( previous );

  script = document.createElement( 'script' );
  script.src = src;
  script.type = 'text/javascript';
  script.id = 'getpostScript';
  script.defer = true;
  body.appendChild( script );
//     setTimeout( "dummy()", 1000 );
   //get( "tod_cont" ).innerHTML = "<p><br/><br/><div style='text-align:center;font-size:13px;color:#ff3300'>Due to some technical problems our forum is temporarily down.  We are working hard to get it up.</div></p><br/><p><div style='text-align:center;font-size:13px; color:#0066FF'>Sorry for any inconvenience this may cause.</div></p>";
//    '"><td align="center"><font face="sans-serif" color="' + fg +
}

////////////////////////////////////////////////////////////////
function show_post( arr )
{
   var i = 0;
   var j = 0;

   var inna = unescape( arr );

   var tmp = inna.replace(/\[right\]\[snapback\]\d{0,7}\[\/snapback\]\[\/right\]/g, "...");

   tmp = tmp.replace(/<#EMO_DIR#>/g, "default");

   tmp = tmp.replace(/\[itblist\]/g, "\<div class=\'itblist\'\>");

   tmp = tmp.replace(/\[\/itblist\]/g, "\<\/div\>");

   tmp = tmp.replace(/\[itbsub\]/g, "\<sub\>");
   tmp = tmp.replace(/\[\/itbsub\]/g, "\<\/sub\>");

   tmp = tmp.replace(/\[itbdivider\]/g, "\<img width=\'99\%\' height=\'22\' src=\'\/images\/orange_divider\.gif\'\/\>");

//          alert( tmp );

   inna = tmp;
   //inna = "Due to some technical problems our forum is temporarily down.  We are working hard to get it up.  Sorry for any inconvenience this may cause.";
   get( "tod_cont" ).innerHTML = inna;
}

function is_defined( elem )
{
  if ( typeof( elem ) != "undefined" )
     return( true );
  return( false );
}
