

function insertFlash() {	
	
  var dv = document.createElement("div");
  dv.setAttribute("id", "flashcontent");
  
  document.body.appendChild(dv);

  var params = {
			menu: 'false',
			quality: 'autohigh',
			scale: "default",
			menu: 'false',
			wmode: 'transparent',
			bgcolor: "#FFFFFF",
			allowScriptAccess: 'always'
		};
	
  var attributes = {
			id: "mymovie",
			name: "/_swf/send_load.swf"
		};
		
   swfobject.embedSWF(
			"/_swf/send_load.swf",	//	swfUrl (String, required) specifies the URL of your SWF
			"flashcontent",		//	id (String, required) specifies the id of the HTML element (containing your alternative content) you would like to have replaced by your Flash content
			'1px',		//	width (String, required) specifies the width of your SWF
			'1px',		//	height (String, required) specifies the height of your SWF
			'8.0.0',	//	version (String, required) specifies the Flash player version your SWF is published for (format is: "major.minor.release")
			false,		//	expressInstallSwfurl (String, optional) specifies the URL of your express install SWF and activates Adobe express install [ http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75 ]. Please note that express install will only fire once (the first time that it is invoked), that it is only supported by Flash Player 6.0.65 or higher on Win or Mac platforms, and that it requires a minimal SWF size of 310x137px.
			//flashvars,	//	flashvars (Object, optional) specifies your flashvars with name:value pairs
			params,		//	params (Object, optional) specifies your nested object element params with name:value pairs
			attributes	//	attributes (Object, optional) specifies your object's attributes with name:value pairs
		);
}




function getMovie(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
}

insertFlash();

//---------------------------------------------

var __serverAddress = "https://servis.ttnetvitamin.com.tr/";
var __login = "Giris";
var __adslLogin = "ADSLGiris";
var __adslUserManagement = "ADSLKullaniciYonetim";
var __register = "Kayit";
var __teacherRegister = "OgretmenKayit";
var __alternativeRegister = "AlternatifKayit";
var __gameRegister = "YarismaKayit";
var __forgotPassword = "Sifre";
var __school = "Okul";

function loginFlash(operation, username, password, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __login, "l_op@#!l_un@#!l_pw", operation + "@#!" + username + "@#!" + password, callBackFunc);
}

function loginTeacherFlash(operation, username, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __login, "l_op@#!l_un", operation + "@#!" + username, callBackFunc);
}

function adslLoginFlash(operation, adslNumber, adslUsername, adslPassword, captchaId, captchaResponse, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __adslLogin, "al_op@#!al_a_num@#!al_a_usn@#!al_a_pwd@#!al_cid@#!al_cr", 
				operation + "@#!" + adslNumber + "@#!" + adslUsername + "@#!" + adslPassword + "@#!" + captchaId + "@#!" + captchaResponse, callBackFunc);
}

function adslGetUsersFlash(operation, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __adslUserManagement, "aum_op", operation, callBackFunc);
}

function deleteUserFlash(operation, userId, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __adslUserManagement, "aum_op@#!aum_uid", operation + "@#!" + userId, callBackFunc);
}

function alternativeCheckUsernameFlash(operation, username, birthDate, addOnId, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __alternativeRegister, "r_op@#!r_un@#!r_bd@#!r_aid", operation + "@#!" + username + "@#!" + birthDate + "@#!" + addOnId, callBackFunc);
}

function alternativeRegisterFlash(operation, userid, schoolNumber, school, classroom, username, birthDate, city, town, address,
							 email, phone, mobilephone, profession, password, secretquestion, secretanswer, addOnId, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __alternativeRegister, "r_op@#!r_uid@#!r_sn@#!r_sid@#!r_crid@#!r_un@#!r_bd@#!r_cid@#!r_tid@#!r_a@#!r_e@#!r_p@#!r_mp@#!r_pid@#!r_pw@#!r_sqid@#!r_sqa@#!r_aid", 
				operation + "@#!" + userid + "@#!" + schoolNumber + "@#!" + school + "@#!" + classroom + "@#!" + username + "@#!" + birthDate + "@#!" + city + "@#!" + town + "@#!" + address +
				 "@#!" + email + "@#!" + phone + "@#!" + mobilephone + "@#!" + profession + "@#!" + password + "@#!" + secretquestion + "@#!" + secretanswer + "@#!" + addOnId, callBackFunc);
}

function checkUsernameFlash(operation, username, birthDate, addOnId, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __register, "r_op@#!r_un@#!r_bd@#!r_aid", operation + "@#!" + username + "@#!" + birthDate + "@#!" + addOnId, callBackFunc);
}

function otherRegisterFlash(operation, userid, username, birthDate, city, town, address, email, phone,
							mobilephone, profession, password, secretquestion, secretanswer, addOnId, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __register, "r_op@#!r_uid@#!r_un@#!r_bd@#!r_cid@#!r_tid@#!r_a@#!r_e@#!r_p@#!r_mp@#!r_pid@#!r_pw@#!r_sqid@#!r_sqa@#!r_aid", 
				operation + "@#!" + userid + "@#!" + username + "@#!" + birthDate + "@#!" + city + "@#!" + town + "@#!" + address + "@#!" + email + "@#!" + 
				phone + "@#!" + mobilephone + "@#!" + profession + "@#!" + password + "@#!" + secretquestion + "@#!" + secretanswer + "@#!" + addOnId, callBackFunc);
}

function registerFlash(operation, userid, schoolNumber, username, birthDate, city, town, address, email, phone,
							mobilephone, profession, password, secretquestion, secretanswer, addOnId, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __register, "r_op@#!r_uid@#!r_sn@#!r_un@#!r_bd@#!r_cid@#!r_tid@#!r_a@#!r_e@#!r_p@#!r_mp@#!r_pid@#!r_pw@#!r_sqid@#!r_sqa@#!r_aid", 
				operation + "@#!" + userid + "@#!" + schoolNumber + "@#!" + username + "@#!" + birthDate + "@#!" + city + "@#!" + town + "@#!" + address + "@#!" + email + "@#!" + 
				phone + "@#!" + mobilephone + "@#!" + profession + "@#!" + password + "@#!" + secretquestion + "@#!" + secretanswer + "@#!" + addOnId, callBackFunc);
}

function checkTeacherFlash(operation, username, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __teacherRegister, "r_op@#!r_un", operation + "@#!" + username, callBackFunc);
}

function teacherRegisterFlashOld(operation, userid, username, birthDate, city, town, address, email, phone,
							mobilephone, profession, password, secretquestion, secretanswer, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __teacherRegister, "r_op@#!r_uid@#!r_un@#!r_bd@#!r_cid@#!r_tid@#!r_a@#!r_e@#!r_p@#!r_mp@#!r_pid@#!r_pw@#!r_sqid@#!r_sqa", 
				operation + "@#!" + userid + "@#!" + username + "@#!" + birthDate + "@#!" + city + "@#!" + town + "@#!" + address + "@#!" + email + "@#!" + 
				phone + "@#!" + mobilephone + "@#!" + profession + "@#!" + password + "@#!" + secretquestion + "@#!" + secretanswer, callBackFunc);
}

function teacherRegisterFlash(operation, userid, username, birthDate, city, town, address, email, phone, mobilephone, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __teacherRegister, "r_op@#!r_uid@#!r_un@#!r_bd@#!r_cid@#!r_tid@#!r_a@#!r_e@#!r_p@#!r_mp",
				operation + "@#!" + userid + "@#!" + username + "@#!" + birthDate + "@#!" + city + "@#!" + 
				town + "@#!" + address + "@#!" + email + "@#!" + phone + "@#!" + mobilephone, callBackFunc);
}

function getSecretQuestionsFlash(operation, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __alternativeRegister, "r_op", operation, callBackFunc);
}

function getProfessionsFlash(operation, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __alternativeRegister, "r_op", operation, callBackFunc);
}

function checkUsernameFPFlash(operation, username, captchaId, captchaResponse, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __forgotPassword, "fp_op@#!fp_un@#!fp_cid@#!fp_cr", operation + "@#!" + username + "@#!" + captchaId + "@#!" + captchaResponse, callBackFunc);
}

function checkSecretQuestionFlash(operation, userId, birthDate, secretQuestionId, secretAnswer, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __forgotPassword, "fp_op@#!fp_uid@#!fp_bd@#!fp_sqid@#!fp_sa", operation + "@#!" + userId + "@#!" + birthDate + "@#!" + secretQuestionId + "@#!" + secretAnswer, callBackFunc);
}

function changePasswordFlash(operation, userId, password, token, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __forgotPassword, "fp_op@#!fp_uid@#!fp_pw@#!fp_t", operation + "@#!" + userId + "@#!" + password + "@#!" + token, callBackFunc);
}

function getSecretQuestionsFlashFP(operation, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __forgotPassword, "fp_op", operation, callBackFunc);
}

function selectSchoolFlash(operation, schoolId, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __school, "ss_op@#!ss_sid", operation + "@#!" + schoolId, callBackFunc);
}

function checkGameUserFlash(operation, username, birthdate, captchaId, captchaResponse, schoolNumber, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __gameRegister, "r_op@#!gr_un@#!gr_bd@#!gr_caid@#!gr_cr@#!gr_gsn", 
				operation + "@#!" + username + "@#!" + birthdate + "@#!" + captchaId + "@#!" + captchaResponse + "@#!" + schoolNumber, callBackFunc);
}

function registerGameUserFlash(operation, userid, username, birthDate, school, classroom, schoolNumber, password,
							secretquestion, secretanswer, email, phone, mobilephone, city, town, address, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __gameRegister, "r_op@#!gr_uid@#!gr_un@#!gr_bd@#!gr_sid@#!gr_clid@#!gr_sn@#!gr_pw@#!gr_sqid@#!gr_sa@#!gr_e@#!gr_p@#!gr_mp@#!gr_ciid@#!gr_tid@#!gr_a",
				operation + "@#!" + userid + "@#!" + username + "@#!" + birthDate + "@#!" + school + "@#!" + classroom + "@#!" + schoolNumber + "@#!" + password + "@#!" + 
				secretquestion + "@#!" + secretanswer + "@#!" + email + "@#!" + phone + "@#!" + mobilephone + "@#!" + city + "@#!" + town + "@#!" + address, callBackFunc);
}

function getSecretQuestionsFlashGame(operation, callBackFunc) {
	var fl = getMovie("flashcontent");
	fl.sendData(__serverAddress + __gameRegister, "r_op", operation, callBackFunc);
}
