// JavaScript Document

var ImageArray = new Array();

function ImageLoader(ImageName) {
	ImageArray[ImageArray.length] = new Image();
	ImageArray[ImageArray.length-1].src = ImageName;
}

ImageLoader("_image/background.gif");
ImageLoader("flash/bc.gif");
ImageLoader("flash/bl.gif");
ImageLoader("flash/br.gif");
ImageLoader("flash/lc.gif");
ImageLoader("flash/rc.gif");
ImageLoader("flash/uc.gif");
ImageLoader("flash/ul.gif");
ImageLoader("flash/ur.gif");
ImageLoader("img/back.gif");
ImageLoader("img/next.gif");
ImageLoader("img/prev.gif");
ImageLoader("img/signsit.gif");
ImageLoader("img/tablo.gif");
ImageLoader("flash/l.gif");
ImageLoader("flash/r.gif");

// HINTBOX BEGIN
function hintbox(){
	ishintbox = findObj("hintbox");
	if (!ishintbox) 
	{
		try {
		node = document.createElement("DIV");	
		node.id = "hintbox";
		node.className  = "hintbox";
		AddEvent(node,"mouseover",hintover);
		AddEvent(node,"mouseout",hintout);
		document.body.appendChild(node);
		return node;
		}
		catch(exception)
		{
			alert(exception);
			return false;
		}
	}
	else 
	{
		return ishintbox;
	}
}

function hintover() { selfobj = findObj("hintbox"); selfobj.style.visibility = "visible"}

function hintout() { selfobj = findObj("hintbox"); selfobj.style.visibility = "hidden"}

function showhint(text,px,py){
	box = findObj("hintbox");
	box.innerHTML = text;
	box.style.top = py;
	box.style.left = px;
	box.style.visibility = "visible";
	box.style.backgroundImage="none";
	box.style.fontSize = "9px";
	box.style.fontFamily = "Verdana";
}

function hidehint(){
	box = findObj("hintbox");
	box.style.visibility = "hidden";
}

// HINTBOX END

function browserDetect(){
		this.ver=navigator.appVersion
		this.dom=document.getElementById?1:0
		this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
		this.ie4=(document.all && !this.dom)?1:0;
		this.ns4=(document.layers && !this.dom)?1:0;
		this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
		this.tarayici=(this.ie4 || this.ie5 || this.ns4 || this.ns5)
		return this
	}
	
function wW() {

	if (document.all) {
		return document.body.offsetWidth;
	} 
	else {
		return window.innerWidth
	}	
}

function wH() {
	if (document.all) {
		return document.body.offsetHeight;
	} 
	else {
		return window.innerHeight;
	}
}

function sW() {
	return screen.width;
}

function sH() {
	return screen.height;
}	

function fullScreen() 
{
removeOP();
var versiyon=parseInt(navigator.appVersion);
var tarayici=navigator.appName;
if (versiyon>3) 
{	
	if (tarayici=="Netscape"|| tarayici == "Opera") 
	{
		if (top.screenX>0 || top.screenY>0) top.moveTo(0,0);
		if (top.outerWidth < screen.width)top.outerWidth=screen.width;
		if (top.outerHeight < screen.height) top.outerHeight = screen.height;
		return true;
	}	
	else 
	{
		top.moveTo(-4,-4);
		top.resizeTo(screen.width+8,screen.height+8);
		return true;
	}
}
return false;
}

function AddEvent(obj,eventName,func){
	if(obj.attachEvent)
	{
		obj.attachEvent('on'+eventName,func);
	}
	else if(obj.addEventListener)
	{
		obj.addEventListener(eventName,func,false);
	}
}

function findObj(theObj, theDoc)

{

  var p, i, foundObj;

  

  if(!theDoc) theDoc = document;

  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)

  {

    theDoc = parent.frames[theObj.substring(p+1)].document;

    theObj = theObj.substring(0,p);

  }

  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];

  for (i=0; !foundObj && i < theDoc.forms.length; i++) 

    foundObj = theDoc.forms[i][theObj];

  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 

    foundObj = findObj(theObj,theDoc.layers[i].document);

  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);

  

  return foundObj;

}

function getTarget(event) {
	target = event.srcElement;
	if (!target) target = event.target;
	if (target) {return target}else{return false};
}

function getMousePoint(e){
	if(myBrowser.ns4 || myBrowser.ns5){
		x=e.pageX;
		y=e.pageY;
	}
	else {
		x=event.x;
		y=event.y;
	}

	if(myBrowser.ie4 || myBrowser.ie5) {
		y=y+eval(scrolled)
	}
	mp = new Object();
	mp.x=x+10;
	mp.y=y+20;
	return mp;
}

function GetXmlHttpObject(){ 
	var objXMLHttp=null
	if (window.XMLHttpRequest)
		{
			objXMLHttp=new XMLHttpRequest()
		}
	else if (window.ActiveXObject)
		{
			objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
		}
	return objXMLHttp
} 

function getNum(str)
{
	var num,where;
	where = str.indexOf("px");
	num = str.substring(0,where);
	return Number(num);
}

function removeOP() { 
  theObjects = document.getElementsByTagName("object");
  for (var i = 0; i < theObjects.length; i++) {
    theObjects[i].outerHTML = theObjects[i].outerHTML;
  }
}

function gett(act) {
	myframe = findObj("Content");
	myframe.src = act+".html";
	};