﻿var domainname = "ServerPHP/";
var domainnamecontent = "";

c_Titles = new Array();
c_Titles[0]="Prof.";
c_Titles[1]="Dr.";
c_Titles[2]="Mr.";
c_Titles[3]="Mrs.";
c_Titles[4]="Ms.";

c_Type = new Array();
c_Type[0] = "Invited Speaker";
c_Type[1] = "Poster Presentation";
c_Type[2] = "Participation Only";

c_Scope = new Array();
c_Scope[0] = "Quantum Key Distribution";
c_Scope[1] = "Josephson Junction Qubits";
c_Scope[2] = "Quantum Repeaters";
c_Scope[3] = "Nuclear/Electron Spin Qubits";
c_Scope[4] = "Quantum Communication Protocol";
c_Scope[5] = "Trapped Ion Qubits";
c_Scope[6] = "Quantum Metrology";
c_Scope[7] = "Molecular Qubits";
c_Scope[8] = "Quantum Simulation";
c_Scope[9] = "Continuous Variable";
c_Scope[10] = "Quantum Computation";
c_Scope[11] = "Atom Chip";
c_Scope[12] = "Cavity Quantum Electrodynamics";


function XML2ArrayInitialize(tXML)
{
	g_tXML = tXML;
	g_textlen = tXML.length;
	g_ip = 0;
	g_is = 0;
//	g_Conv_i = 0;
}

function XML2ArrayGoIntoTag(Tag)
{
	g_ip = g_tXML.indexOf(Tag,g_ip);
	return g_ip;
}

function XML2ArrayGetNextTagContent(TagStart, TagEnd)
{
	g_ip = g_tXML.indexOf(TagStart, g_ip);
	if(g_ip < 0){return -1;}
	g_is = g_ip + TagStart.length;
	g_ip = g_tXML.indexOf(TagEnd, g_ip);
	if(g_ip < 0){return -1;}
	return g_tXML.substring(g_is, g_ip);
}

function FindXMLContent(text, tag, tag2)
{
	var ip = text.indexOf(tag,0);
	if(ip < 0){return null;}
	var is = ip + tag.length;
	ip = text.indexOf(tag2,ip);
	if(ip < 0){return null;}
	return text.substring(is,ip);
}

function getHttpObject(){
	var xmlhttp;
	if(window.ActiveXObject){
		try{
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			try{
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			}catch(e){
				xmlhttp = false;
			}
		}
	}else if(window.XMLHttpRequest){
		try{
			xmlhttp = new XMLHttpRequest();
		}catch(e){
			xmlhttp = false;
		}
	}
	return xmlhttp;
}


function VerifyChars(textXML)
{
	textXML = textXML.replace(/：/igm,":");
	textXML = textXML.replace(/“/igm,"\"");
	textXML = textXML.replace(/”/igm,"\"");
	textXML = textXML.replace(/″/igm,"\"");
	textXML = textXML.replace(/</igm,"");
	textXML = textXML.replace(/>/igm,"");
	textXML = textXML.replace(/（/igm,"\(");
	textXML = textXML.replace(/）/igm,"\)");
	textXML = textXML.replace(/\'/igm,"’");
	textXML = textXML.replace(/\"/igm,"″");
	textXML = textXML.replace(/&/igm,"＆");
	
	textXML = VerifyEChars(textXML);
	
	return textXML;
}

function VerifyEChars(text)
{	
	text = text.replace(/Ａ/igm,"A");
	text = text.replace(/Ｂ/igm,"B");
	text = text.replace(/Ｃ/igm,"C");
	text = text.replace(/Ｄ/igm,"D");
	text = text.replace(/Ｅ/igm,"E");
	text = text.replace(/Ｆ/igm,"F");
	text = text.replace(/Ｇ/igm,"G");
	text = text.replace(/Ｈ/igm,"H");
	text = text.replace(/Ｉ/igm,"I");
	text = text.replace(/Ｊ/igm,"J");
	text = text.replace(/Ｋ/igm,"K");
	text = text.replace(/Ｌ/igm,"L");
	text = text.replace(/Ｍ/igm,"M");
	text = text.replace(/Ｎ/igm,"N");
	text = text.replace(/Ｏ/igm,"O");
	text = text.replace(/Ｐ/igm,"P");
	text = text.replace(/Ｑ/igm,"Q");
	text = text.replace(/Ｒ/igm,"R");
	text = text.replace(/Ｓ/igm,"S");
	text = text.replace(/Ｔ/igm,"T");
	text = text.replace(/Ｕ/igm,"U");
	text = text.replace(/Ｖ/igm,"V");
	text = text.replace(/Ｗ/igm,"W");
	text = text.replace(/Ｘ/igm,"X");
	text = text.replace(/Ｙ/igm,"Y");
	text = text.replace(/Ｚ/igm,"Z");
	
	text = text.replace(/ａ/igm,"a");
	text = text.replace(/ｂ/igm,"b");
	text = text.replace(/ｃ/igm,"c");
	text = text.replace(/ｄ/igm,"d");
	text = text.replace(/ｅ/igm,"e");
	text = text.replace(/ｆ/igm,"f");
	text = text.replace(/ｇ/igm,"g");
	text = text.replace(/ｈ/igm,"h");
	text = text.replace(/ｉ/igm,"i");
	text = text.replace(/ｊ/igm,"j");
	text = text.replace(/ｋ/igm,"k");
	text = text.replace(/ｌ/igm,"l");
	text = text.replace(/ｍ/igm,"m");
	text = text.replace(/ｎ/igm,"n");
	text = text.replace(/ｏ/igm,"o");
	text = text.replace(/ｐ/igm,"p");
	text = text.replace(/ｑ/igm,"q");
	text = text.replace(/ｒ/igm,"r");
	text = text.replace(/ｓ/igm,"s");
	text = text.replace(/ｔ/igm,"t");
	text = text.replace(/ｕ/igm,"u");
	text = text.replace(/ｖ/igm,"v");
	text = text.replace(/ｗ/igm,"w");
	text = text.replace(/ｘ/igm,"x");
	text = text.replace(/ｙ/igm,"y");
	text = text.replace(/ｚ/igm,"z");
	
	text = text.replace(/１/igm,"1");
	text = text.replace(/２/igm,"2");
	text = text.replace(/３/igm,"3");
	text = text.replace(/４/igm,"4");
	text = text.replace(/５/igm,"5");
	text = text.replace(/６/igm,"6");
	text = text.replace(/７/igm,"7");
	text = text.replace(/８/igm,"8");
	text = text.replace(/９/igm,"9");
	text = text.replace(/０/igm,"0");
	
	return text;
}