﻿var titletext=" KoçAilem ";
var titlestarted=false;
var titlestep=0;
function welcometext()
{
if (titlestarted==false)
{
titlestarted = true;
document.title = titletext;
setTimeout("titleanim()",1);
}
}
function titleanim()
{		
titlestep++
if (titlestep==7) {titlestep=1}
if (titlestep==1) {document.title='.::::'+titletext+'::::.'}
if (titlestep==2) {document.title=':.:::'+titletext+':::.:'}
if (titlestep==3) {document.title='::.::'+titletext+'::.::'}
if (titlestep==4) {document.title=':::.:'+titletext+':.:::'}
if (titlestep==5) {document.title='::::.'+titletext+'.::::'}
if (titlestep==6) {document.title=':::::'+titletext+':::::'}
setTimeout("titleanim()",200);
}
if (document.title)
{
//window.onload=welcometext;
welcometext();
}		


////   print_begin    ////

function Querystring(qs) { // optionally pass a querystring to parse
	this.params = new Object()
	this.get=Querystring_get
	
	if (qs == null)
		qs=location.search.substring(1,location.search.length)

	if (qs.length == 0) return

// Turn <plus> back to <space>
// See: http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1
	qs = qs.replace(/\+/g, ' ')
	var args = qs.split('&') // parse out name/value pairs separated via &
	
// split out each name=value pair
	for (var i=0;i<args.length;i++) {
		var value;
		var pair = args[i].split('=')
		var name = unescape(pair[0])

		if (pair.length == 2)
			value = unescape(pair[1])
		else
			value = name
		
		this.params[name] = value
	}
}

function Querystring_get(key, default_) {
	// This silly looking line changes UNDEFINED to NULL
	if (default_ == null) default_ = null;
	
	var value=this.params[key]
	if (value==null) value=default_;
	
	return value
}

////   print_end    ////




function printLayer(id){
		var o = document.getElementById(id);
		if(!o||o.innerHTML==''){return;};
		window.open('/Print.html?div='+o.id,'printerWindow','resizable=yes,scrollbars=yes,width=400,height=400');
	}


function OpenWindow(theURL,winName,size) {
		strwinName = window.open(theURL,winName,size);}
		
		
//OpenWindow('a.html','WinName','toolbar=no,directories=no,status=no,resizable=no,scrollbars=no,menubar=no,width=550,height=450')



//number control
var XLCheck = function(k,type){
var keynum;
var keychar;
var regExMyEx;
if(window.event){ // IE
    keynum = k.keyCode;
}else if(e.which){ // Netscape/Firefox/Opera
    keynum = k.which;
}
keychar = String.fromCharCode(keynum);    
switch(type){
    case "alpha":
        regExMyEx = /^[a-zA-Z\s]+$/;
        return regExMyEx.test(keychar);
    break;
    case "alphanum":
        regExMyEx = /^[\w\s]+$/;
        return regExMyEx.test(keychar);
    break;    
    case "integer":
        regExMyEx = /^[+]?\d+$/;
        var result = regExMyEx.test(keychar);
        return result;
    break;
    }
};
//number control



//popup
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function OpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) {
	if(window.screen)
		if(isCenter)
			if(isCenter=="true"){
				var myLeft = (screen.width-myWidth)/2;
				var myTop = (screen.height-myHeight)/2;
				features+=(features!='')?',':'';
				features+=',left='+myLeft+',top='+myTop;
			}
	strwinName = window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
	strwinName.focus();
}

function windowOpener(windowHeight, windowWidth, windowName, windowUri)
{
    var centerWidth = (window.screen.width - windowWidth) / 2;
    var centerHeight = (window.screen.height - windowHeight) / 2;

    newWindow = window.open(windowUri, windowName, 'resizable=0,width=' + windowWidth + 
        ',height=' + windowHeight + 
        ',left=' + centerWidth + 
        ',top=' + centerHeight);

    newWindow.focus();
    return newWindow.name;
}

function windowOpenerLeftMargin(windowHeight, windowWidth, windowName, windowUri, leftMargin)
{
    var centerWidth = leftMargin;
    var centerHeight = (window.screen.height - windowHeight) / 2;

    newWindow = window.open(windowUri, windowName, 'resizable=0,width=' + windowWidth + 
        ',height=' + windowHeight + 
        ',left=' + centerWidth + 
        ',top=' + centerHeight);	
    newWindow.focus();
    return newWindow.name;
}
//popup