// DilOkuluBul JavaScript Document


// ## CONSTANTS 
var swf_SubjectsEnabled = true; // false durumunda, flash basliklar yerine CSS'li basliklar yazdirir.
var CONST_countOfMP_PopulerOkul = 5; // Toplam Populer Okul Ulke adedi
// ## END OF CONSTANTS;

// ** DO NOT EDIT ** //
var bLayerObj = "";
var guideStillOnOver = true;
var guideInterval = 0;
var guideSeqInterval = 0;
// ** END OF DNE; **//

// ## FUNCTIONS


function DilO_Visible( ) {
	if (document.layers) {
		var mLayerObj = document.mainPDIV;
	} else if (document.getElementById) {
		var mLayerObj = document.getElementById('mainPDIV');
	} else if (document.all) { 
		var mLayerObj = document.all.mainPDIV;
	}	
	mLayerObj.style.visibility = "visible";
}

function changeMPO( divID ) {
	for( var j = 0; j < CONST_countOfMP_PopulerOkul; j++ ) {
		if (document.layers) {
			eval("layerObj = document.doMP_Div" + j + ";");
		} else if (document.getElementById) {
			eval("layerObj = document.getElementById('doMP_Div" + j + "').style;");
		} else if (document.all) { 
			eval("layerObj = document.all.doMP_Div" + j + ".style;");
		}
		// let's hide and seek;
		layerObj.visibility = (( j == divID ) ? 'visible' : 'hidden' );
//		layerObj.height = (( j == divID ) ? '100%' : '1px' );
		layerObj.position = (( j == divID ) ? 'relative' : 'absolute' );
	}
}

function pencere1()
{
window.open("http://www.icep.com.tr/quiz2.asp","isube","top=0,left=0,width=650,height=500,status,scrollbars=1,resizable")
}

function swf_Subject( subjectName, objectWidth, objectHeight ) {
	if( objectHeight == "" || String(objectHeight) == "undefined" ) objectHeight = 30;
	if( objectWidth == "" || String(objectWidth) == "undefined" ) objectWidth = 200;
	
	subjectName = String(subjectName).replace(/ /g, "~~B");
	
	if( swf_SubjectsEnabled ) {
		var returner = "";

		returner += '<object type="application/x-shockwave-flash" data="/FlashOutput/texts' + objectWidth + '.swf?clickTAG=' + subjectName + '" width="' + ((objectWidth== 200)?180:((objectWidth==400)?500:objectWidth)) + '" height="' + objectHeight + '">\r\n';
        returner += '	<param name="movie" value="/FlashOutput/texts' + objectWidth + '.swf?clickTAG=' + subjectName + '" />\r\n';
        returner += '	<param name="wmode" value="transparent">\r\n';
        returner += '</object>';
		document.write(returner);
		
	} else {
		document.write("<font class=\"subject'" + objectWidth + "'\">" + subjectName + "</font>");
	}
}

function bookmarksite(title,url){
	if (window.sidebar) // firefox
		window.sidebar.addPanel(title, url, "");
	else if(window.opera && window.print){ // opera
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	} 
	else if(document.all)// ie
		window.external.AddFavorite(url, title);
}

function open_windowc(url)
{
var rndURL = (1000*Math.random());
h=400;
w=400;
mywin = window.open(url,'win','width='+w+',height='+h+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2+',location=0,directories=0,status=no,menuBar=no,scrollBars=no,resizable=no');mywin.focus();
}

function ShowRecommend(){
var rndURL = (1000*Math.random());
var url = "/tellfriend.asp?url=/index.asp";
h=400;
w=350;
newWindow = window.open(url,'search','width='+w+',height='+h+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2+',location=0,directories=0,status=no,menuBar=no,scrollBars=no,resizable=no');
newWindow.focus();
}


function fla_Favorite(){
	bookmarksite(document.title, location.href)
}
function fla_Recomend(){
	ShowRecommend();
}
function fla_Contact(){
	open_windowc('/contact2.asp');
}

function bDIVGen() {
	return 0;
	if (document.layers) {
		bLayerObj = document.bDiv;
	} else if (document.getElementById) {
		bLayerObj = document.getElementById('bDiv');
	} else if (document.all) { 
		bLayerObj = document.all.bDiv;
	}
	setInterval("bDIVCheck()", 1000);
	setInterval("bDIVInnerHTML()", 35000);
	bDIVInnerHTML();
}

function guideLinks( show ) {
	var gLayerObj;
	if (document.layers) {
		gLayerObj = document.altMDiv;
	} else if (document.getElementById) {
		gLayerObj = document.getElementById('altMDiv');
	} else if (document.all) { 
		gLayerObj = document.all.altMDiv;
	}	
	gLayerObj.style.visibility = (( show == 1) ? "visible" : "hidden");
	if( show == 1 ) {
		guideStillOnOver = true;
		var guideSeqInterval = setInterval("guideStartSeq()", 1500);
	}		
}

function guideStartSeq( ) {
	if( guideInterval == 0 ) {
		clearInterval(guideSeqInterval);
		guideInterval = setInterval("guideCheck()", 1500);
	}
}

function guideCheck( ) {
	if( guideStillOnOver == false )	 {
		guideLinks(0);	
		clearInterval(guideInterval);
		guideInterval = 0;
	}
}
function bDIVInnerHTML() {
	bLayerObj.innerHTML = '<object type="application/x-shockwave-flash" data="FlashOutput/miniB.swf" width="400" height="360">  <param name="movie" value="FlashOutput/miniB.swf" /><param name="wmode" value="transparent" /></object>';
	setTimeout("bDIVClear()", 10000);
}

function bDIVClear() {
	bLayerObj.innerHTML = "";	
}

function bDIVCheck() {
//	bLayerObj.width=400;
//	bLayerObj.height=400;
	bLayerObj.style.top = 530;
}
// ## END OF FUNCTIONS;