var openpopupWindow=null;
function openpopup (mypage,myname,w,h,pos,infocus,scrolling){
	if(pos=='random'){
		LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
		TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
	}
	if(pos=='center'){
		LeftPosition=(screen.width)?(screen.width-w)/2:100;
		TopPosition=(screen.height)?(screen.height-h)/2:100;
	} else if((pos!='center' && pos!='random') || pos==null){
		LeftPosition=100;TopPosition=100;
	}
	settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=' + scrolling + ',resizable=no,dependent=no';
	openpopupWindow=window.open('',myname,settings);
	if(infocus=='front'){
		openpopupWindow.focus();
		openpopupWindow.location=mypage;
	}
}

function actionlink () {
	return;
}

function confirmthis (jsmsg) { 
	Check = confirm(jsmsg);
	if(Check == false) {
		return false;
	}
}

function hover(action,name,color) {
	if (action == 'on') {
		x = 2;
	} else {
		x = 3;
	}
	if (document.images){
		document[name].src = '../images/dot.' + color + x + '.gif';
	}
	window.status = '';
	return true;
}

function textLimiter(field, countfield, maxlimit) {
	if (field.value.length > maxlimit) {
		field.value = field.value.substring(0, maxlimit);
	} else {
		countfield.value = maxlimit - field.value.length;
	}
}

var dropdown_count = 0;

function dropdown()
{

}

function dropdown_onmouseover()
{
	if(navigator.appVersion.indexOf("MSIE 5") >= 0 &&
	   navigator.appVersion.indexOf("Macintosh") >= 0)
	{
		this.childNodes[1].style.display = "block";
	}
	else
	{
		this.className += " hover";
	}
}

function dropdown_onmouseout()
{
	if(navigator.appVersion.indexOf("MSIE 5") >= 0 &&
	   navigator.appVersion.indexOf("Macintosh") >= 0)
	{
		this.childNodes[1].style.display = "none";
	}
	else
	{
		this.className = this.className.replace(" hover", "");
	}
}

function dropdown_init()
{
	if(!document.all || !document.getElementsByTagName) return;

	ul = document.getElementsByTagName("ul");

	for(i = 0; i < ul.length; i++)
	{
		if(ul[i].className.indexOf("dropdown") < 0) continue;

		for(d = 0; d < ul[i].childNodes.length; d++)
		{
			node = ul[i].childNodes[d];
			if(node.nodeName == "LI")
			{
				node.onmouseover = dropdown_onmouseover;
				node.onmouseout = dropdown_onmouseout;
			}
		}

	}
}

window.onload = dropdown_init;

/*function disableRightClick(e)
{
  var message = "Right click disabled";
  
  if(!document.rightClickDisabled) // initialize
  {
    if(document.layers) 
   {
      document.captureEvents(Event.MOUSEDOWN);
      document.onmousedown = disableRightClick;
    }
    else document.oncontextmenu = disableRightClick;
    return document.rightClickDisabled = true;
  }
  if(document.layers || (document.getElementById && !document.all))
  {
    if (e.which==2||e.which==3)
    {

      return false;
    }
  }
  else
  {

    return false;
  }
}
disableRightClick();
*/

function go_width(lang)
{
	window.location.href = "content.php?start=ok&s_res=" + screen.width + '&lang=' + lang;
	return false;
}

function getresolution() {
	document.myform.s_res.value = screen.width;
}

