var 
	screenh=screen.height;
var 
	screenw=screen.width;
var 
	MenuButtonsDistance=2;

//-------------------------------N E W------------------------------------//
function OpenNewWindow(c, widthPercent, heightPercent)
{
  var h=screen.height;
  var w=screen.width;
  window.open(c,"a","scrollbars=yes,width="+((w*widthPercent)/100)+",height="+((h*heightPercent)/100));
}
function Write(_Content)
{
	document.write(_Content);
}
function ImagedLink(_Image, _Title, _Link, _Target)
{
	document.write("<table border='0'><tr><th width='25' valign='top'>");
	document.write("<a href='"+_Link+"' target='"+_Target+"' class='Font_E_2'><img  src='"+_Image+"' border='0'></a></th>");
	document.write("<th align='left'><a href='"+_Link+"' target='"+_Target+"' class='Font_E_2'><font class='clr1'>"+_Title+"</a></th></tr></table>");
}
function VirtualOneBlock(_Width, _Height, _Content)
{
	document.write("<table border='0' cellpadding='0' cellspacing='0' width='"+_Width+"%' height='"+_Height+"%'>");
	document.write("<tr><th>"+_Content+"</th></tr>");
	document.write("</table>");
}
function VirtualTwoBlock(_Width, _Height, _LeftContent,_RightContent)
{
	document.write("<table border='0' cellpadding='0' cellspacing='0' width='"+_Width+"%' height='"+_Height+"%'>");
	document.write("<tr><th>"+_LeftContent+"</th><th>"+_RightContent+"</th></tr>");
	document.write("</table>");
}
function GetImagedLink(_Image, _Title, _Link, _Target, _LeftDistance)
{
	return "<table border='0'><tr><th width='"+_LeftDistance+"'></th><th width='25' valign='top'><a href='"+_Link+"' target='"+_Target+"' class='Font_E_2'><img  src='"+_Image+"' border='0'></a></th><th align='left'><a href='"+_Link+"' target='"+_Target+"' class='Font_E_2'><font class='clr1'>"+_Title+"</a></th></tr></table>";
}
function GetVirtualOneBlock(_Width, _Height, _Content)
{
	return "<table border='0' cellpadding='0' cellspacing='0' width='"+_Width+"%' height='"+_Height+"%'><tr><th>"+_Content+"</th></tr></table>";
}
function GetVirtualTwoBlock(_Width, _Height, _LeftContent,_RightContent)
{
	return "<table border='0' cellpadding='0' cellspacing='0' width='"+_Width+"%' height='"+_Height+"%'><tr><th width=50% valign=top>"+_LeftContent+"</th><th width=50% valign=top>"+_RightContent+"</th></tr></table>";
}
function GetPanel(width,height,text)
{
	return "<table border=\"0\" class=\"Color_Panel_Border_Age\" width=\""+width+"%\" height=\""+height+"\" cellspacing=\"2\"><tr><th class=\"Color_Panel_Border_Middle\" align=\"center\" valign='middle'><table width=\"99.99%\" height=\"99.99%\" border=\"0\" cellspacing=\"1\" class=\"Color_Panel_Border_Inside\"><tr><th class=\"Color_Panel_Ground\" align=\"center\"  valign=\"middle\">"+text+"</th></table></th></tr></table>";
}
function GetPanelHeightPercented(width,height,text)
{
	return "<table border=\"0\" class=\"Color_Panel_Border_Age\" width=\""+width+"%\" height=\""+height+"%\" cellspacing=\"2\"><tr><th class=\"Color_Panel_Border_Middle\" align=\"center\" valign='middle'><table width=\"99.99%\" height=\"99.99%\" border=\"0\" cellspacing=\"1\" class=\"Color_Panel_Border_Inside\"><tr><th class=\"Color_Panel_Ground\" align=\"center\"  valign=\"middle\">"+text+"</th></table></th></tr></table>";
}
function GetPanelFixed(width,height,text)
{
	return "<table border=\"0\" class=\"Color_Panel_Border_Age\" width=\""+width+"%\" height=\""+height+"\" cellspacing=\"2\"><tr><th class=\"Color_Panel_Border_Middle\" align=\"center\" valign='middle'><table width=\"99.99%\" height=\"99.99%\" border=\"0\" cellspacing=\"1\" class=\"Color_Panel_Border_Inside\"><tr><th class=\"Color_Panel_Ground\" align=\"center\"  valign=\"middle\">"+text+"</th></table></th></tr></table>";
}
function GetTitlePanel(width,text,ageTexts)
{	
	return "<TABLE border='0' height='30' width='"+width+"%' cellspacing='0'><tr><th width='3%'>"+	GetPanelFixed(width,30,ageTexts)+"</th><th width='100%'>"+GetPanel(width,30,text)+"</th><th width='3%'>"+GetPanelFixed(width,30,ageTexts)+"</th></tr></table>";
}
function GetMenuLink(id,title,pagelink,lang)
{
	// lang is language in case if i use english menu
	if(lang=='GE')
	return "<a href=\""+pagelink+"\" target=\"main_frm\"  class=\"Font_G_2\" onMouseMove=\"mn"+id+".color='white'\" onMouseOut=\"mn"+id+".color='#0000aa'\"><font id=\"mn"+id+"\" color=\"#0000aa\">"+title+"</font></a>";		
	if(lang=='EN')
	return "<a href=\""+pagelink+"\" target=\"main_frm\"  class=\"Font_E_2\" onMouseMove=\"mn"+id+".color='white'\" onMouseOut=\"mn"+id+".color='#0000aa'\"><font id=\"mn"+id+"\" color=\"#0000aa\">"+title+"</font></a>";			
}
//------------------------------------------------------------------------//

// CurrentPage is a frame in index.html page, that uses as a varible
function SetCurrentPage(s)
{ 
	 window.parent.frames.document.getElementById("CurrentPage").src=s;
}
function sethome() 
{
  window.parent.frames.document.getElementById("main_frm").src="frm/ge/home.htm";
}
function Title(s)
{
	document.write("<title>WWW.G3B.GE - "+s+"</title>");
}
function VDistance(height)
{
	document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><tr><th height=\""+height+"\"></th></tr></table>");
}
function HDistance(width)
{
	document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><tr width=\""+width+"\"><th></th></tr></table>");
}
function MenuLink(id,title,pagelink,lang)
{
	// lang is language in case if i use english menu
	return "<a href=\""+pagelink+"\" target=\"main_frm\"  class=\"Font_G_2\" onMouseMove=\"mn"+id+".color='white'\" onMouseOut=\"mn"+id+".color='#0000aa'\"><font id=\"mn"+id+"\" color=\"#0000aa\">"+title+"</font></a>";		
    //progres bar system
	//return "<a href=\"progress.htm\" target=\"main_frm\"  onClick=\"SetCurrentPage('"+pagelink+"');\" class=\"Font_G_2\" onMouseMove=\"mn"+id+".color='white'\" onMouseOut=\"mn"+id+".color='#0000aa'\"><font id=\"mn"+id+"\" color=\"#0000aa\">"+title+"</font></a>";	
}
function MenuItem(id,title,pagelink,lang)
{
	// lang is language in case if i use english menu
    document.write("<table border=0 cellspacing=0 width=100%><tr><th  valign=top align=right width=3%><font class='Font_E_2'><b>"+id+".</th><th width=97% align=left> <a targer='main_frm' href=\""+pagelink+"\"><font class='Font_G_2'>"+title+"</a></th></tr></table>");	
}
function Panel(width,height,text)
{
	document.write("<table border=\"0\" class=\"Color_Panel_Border_Age\" width=\""+width+"%\" height=\""+height+"%\" cellspacing=\"2\">");
   	document.write("<tr><th class=\"Color_Panel_Border_Middle\" align=\"center\" valign='middle'>");
	document.write("<table width=\"99.99%\" height=\"99.99%\" border=\"0\" cellspacing=\"1\" class=\"Color_Panel_Border_Inside\">");
	document.write("<tr><th class=\"Color_Panel_Ground\" align=\"center\"  valign=\"middle\">"+text+"</th>");
	document.write("</table>");
  	document.write("</th></tr></table>");	
}
function PanelFixed(width,height,text)
{
	document.write("<table border=\"0\" class=\"Color_Panel_Border_Age\" width=\""+width+"\" height=\""+height+"\" cellspacing=\"2\">");
   	document.write("<tr><th class=\"Color_Panel_Border_Middle\" align=\"center\" valign='middle'>");
	document.write("<table width=\"99.99%\" height=\"99.99%\" border=\"0\" cellspacing=\"1\" class=\"Color_Panel_Border_Inside\">");
	document.write("<tr><th class=\"Color_Panel_Ground\" align=\"center\"  valign=\"middle\">"+text+"</th>");
	document.write("</table>");
  	document.write("</th></tr></table>");	
}
function TitlePanel(width,height,text,ageTexts)
{	
  	document.write("<TABLE border='0' height='"+height+"%' width='"+width+"%' cellspacing='0'>");
  	document.write("<tr><th width='3%'>");
	PanelFixed(30,30,ageTexts);
  	document.write("</th><th width='100%'>");
	Panel(width,height,text);
  	document.write("</th><th width='3%'>");
	PanelFixed(30,30,ageTexts);	
	document.write("</th></tr></table>");
}
function Footnote()
{
    return "<b class='Font_E_2' >Copyright &#169;\"G3B\".&nbsp;&nbsp;&nbsp;E-Mail:</b> <a class=\"Font_E_2\" href=\"mailto:g3b_software@yahoo.com\"><b>G3B_Software&#64;yahoo.com.</b>";	
}
function Simbol_1()
{
	return "<table border='0' cellspacing='0' width='100%' height='100%'><tr><th align='center' valign='middle'><img src='../../img/simbol.gif'></th></tr></table>";
	//&#9672
}
function LoadPageInMainFrame(page)
{
	SetCurrentPage(page);
    window.parent.frames.document.getElementById("main_frm").src="frm/ge/progress.htm";
}
function cntr()
{
  document.getElementById("tmp_main").src="../../usr/bin/php/c_main.php";
}
function OpenCalendar()
{
window.open("../other/calendar/2/index.htm","a","width=500,height=300");
}
function OpenRomauli()
{
window.open("../other/romauli/index.htm","a","width=550,height=350");
}
function FrameSize()
{
 if(document.getElementById("frm_services").height==450)
 {
	 document.getElementById("frm_services").height=0;
 }
 else
 {
	 document.getElementById("frm_services").height=450;
 }	 
}
function OpenTexter()
{
 window.open("../other/texter/index.htm","a","width=790,height=560");
 //document.getElementById("frm_services").src="../other/texter/index.htm";
 //FrameSize();
}
function OpenCompTest()
{
window.open("../other/test/index.htm","a","scrollbars=yes,width=790,height=560");
}
function OpenWindow(w)
{
	if(w==1)window.open("../other/convert/index.htm","a","scrollbars=no,width=790,height=450");
	if(w==2)window.open("../other/colors/index.htm","a","scrollbars=yes,width=790,height=450");
}
function CloseRight()
{
 	 window.parent.frames.document.getElementById("global_frm").cols="107,*,0,0";
}
function Exit()
{
  window.parent.close();	
}
function WriteMenu(n,menulink,items)
{
	 document.writeln("<table border=\"0\" cellspacing=\"0\" height=\"100%\" cellpadding=\"0\" width=\"100%\" class=\"Color_Page_Ground\">");
	 for(i=1;i<=n;i++)
	 {
		document.writeln("<tr><th width=\"4%\" height=\"1%\"></th>");
		document.writeln("<th align=\"left\"><table border=0 cellspacing=0 width=100%><tr><th  valign=top align=right width=3%><font class='Font_E_2'><b>"+i+".</th><th width=97% align=left> <a targer='main_frm' href=\""+i+"/"+menulink+"\"><font class='Font_G_2'>"+items[i-1]+"</a></th></tr></table></th>");
		document.writeln("</tr>");
	 }
	 document.writeln("<tr><th width=\"4%\" height=\"100%\"></th></tr></table>");
	 
	 document.writeln("<script src='http://www.google-analytics.com/urchin.js' type='text/javascript'>");
	 document.writeln("</script>");
	 document.writeln("<script type='text/javascript'>");
	 document.writeln("_uacct = 'UA-2635492-1';");
	 document.writeln("urchinTracker();");
	 document.writeln("</script>");
}