// JavaScript Document

function case_cv_popup(f) {
	var url = '../main/personnel/case/cv/' + f + '.html';
	var cvPopup = window.open(url,'cv','top=40,left=40,width=700,height=500,resizable=0,scrollbars=1,menubar=1');
	cvPopup.self.focus();
}

function courseInfo(u) {
		url = "https://ais.ku.edu.tr/KUAIS/CourseInfoweb.asp?CCODE=" + u + "&LANG=EN";
		winname = u;
		window.open(url,name,'width=470,height=230,resizable=1,scrollbars=1');
}

function toggle(toggleId, e) {
		if (!e) {
			e = window.event;
		}
		if (!document.getElementById) {
			return false;
		}
		var body = document.getElementById(toggleId);
		if (!body) {
			return false;
		}	
		var im = toggleId + "_toggle";
		if (body.style.display == 'none') {
			body.style.display = 'block';
			if (document.images[im]) {
				document.images[im].src = "/images/faq_bullet2.gif";
			}
		} else {
			body.style.display = 'none';
			if (document.images[im]) {
				document.images[im].src = "/images/faq_bullet1.gif";
			}
		}
		if (e) {
			// Stop the event from propagating, which
			// would cause the regular HREF link to
			// be followed, ruining our hard work.
			e.cancelBubble = true;
			if (e.stopPropagation) {
				e.stopPropagation();
			}
		}
}

/*

function showPic(i) {

	var photoPage = window.open('','','width=400,height=350,menubar=0,toolbar=0,status=0,resizable=1');
	 photoPage.document.write('<html><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
	 photoPage.document.write('<img src="/images/gsb/album/orientation' + i + '" name="photo"><br>')
	 photoPage.document.write('</body></html>');
	
	var w = photoPage.document.images['photo'].width;
	var h = photoPage.document.images['photo'].height;
	var t = (screen.width-w)/2;
	var l = (screen.height-h)/2;
	 photoPage.self.resizeTo(w,h);
	 photoPage.self.moveTo(t,l);
	 photoPage.focus();

}

*/

function showPic(i) {

	var photoPage = window.open('','','width=400,height=350,menubar=0,toolbar=0,status=0,resizable=1');
	 photoPage.document.write('<html><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
	 photoPage.document.write('<img src="images/CAREER/photogallery' + i + '" name="photo"><br>')
	 photoPage.document.write('</body></html>');
	
	var w = photoPage.document.images['photo'].width;
	var h = photoPage.document.images['photo'].height;
	var t = (screen.width-w)/2;
	var l = (screen.height-h)/2;
	 photoPage.self.resizeTo(w,h);
	 photoPage.self.moveTo(t,l);
	 photoPage.focus();

}

function showPicSGO(i) {

	var photoPage = window.open('','','width=400,height=350,menubar=0,toolbar=0,status=0,resizable=1');
	 photoPage.document.write('<html><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
	 photoPage.document.write('<img src="../images/sgo/' + i + '" name="photo"><br>')
	 photoPage.document.write('</body></html>');
	
	var w = photoPage.document.images['photo'].width;
	var h = photoPage.document.images['photo'].height;
	var t = (screen.width-w)/2;
	var l = (screen.height-h)/2;
	 photoPage.self.resizeTo(w,h);
	 photoPage.self.moveTo(t,l);
	 photoPage.focus();

}

function popupImage1 (c) {
var path='/images/dos/careerservices/' + c;
window.open(path,'','width=135,height=100,menubar=0,toolbar=0,status=0,resizable=1');
}

function popupImage2 (c) {
var path='/images/dos/careerservices/' + c;
window.open(path,'','width=525,height=380,menubar=0,toolbar=0,status=0,resizable=1');
}

function popupCorporate (c) {
var path='/images/dos/careerservices/' + c;
window.open(path,'','width=165,height=375,menubar=0,toolbar=0,status=0,resizable=1');
}

function popupCandidates (c) {
var path='/images/dos/careerservices/' + c;
window.open(path,'','width=600,height=600,menubar=0,toolbar=0,status=0,resizable=1');
}

function popupAlumni (c) {
var path='/images/dos/careerservices/' + c;
window.open(path,'','width=750,height=350,menubar=0,toolbar=0,status=0,resizable=1');
}

function popupDetails (c) {
var path='/images/dos/careerservices/' + c;
window.open(path,'','width=700,height=500,menubar=0,toolbar=0,status=0,resizable=1');
}

function popupAnnounce (c) {
var path='/images/dos/careerservices/' + c;
window.open(path,'','width=590,height=520,menubar=0,toolbar=0,status=0,resizable=1');
}

function popupModify (c) {
var path='/images/dos/careerservices/' + c;
window.open(path,'','width=405,height=200,menubar=0,toolbar=0,status=0,resizable=1');
}

function popupNews (c) {
var path='/images/dos/careerservices/' + c;
window.open(path,'','width=460,height=410,menubar=0,toolbar=0,status=0,resizable=1');
}

function showVideo(n) {
		var url = "/files/video/2008/" + n;
		window.open(url,"v","width=250,height=225,top=100,left=100,resizable=1")
	}
function showVideo2(n) {
		var url = "/files/video/2008/" + n;
		window.open(url,"v","width=320,height=240,top=100,left=100,resizable=1")
	}
	
function showPhoto(i) {
	var url = '/main/album.php?p=' + i;
	var p = window.open(url,'album','width=50,height=50,resizable=1');
}