function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//index&top


//----------popup window---------

function MM_openBrWindow(theURL,winName,features) { //v2.0
var winop = window.open(theURL,winName,features);
  //window.open(theURL,winName,features);
  winop.focus();
}

function preloadClose() {
MM_preloadImages('../../images/commons/popimg/pop_close_roll.gif');
}
function preloadCloseSys() {
MM_preloadImages('../images/commons/popimg/pop_close_roll.gif');
}

function preloadTop() {
MM_preloadImages('images/index/btn_qbist_on.gif','images/index/popbtn_roll.gif');
}


//chaaractor
function preloadPopUp() {
MM_preloadImages('../../images/chara/chara_p_btn_a_roll.gif','../../images/chara/chara_p_btn_b_roll.gif','../../images/chara/chara_p_btn_c_roll.gif');
}

function sub_altair() {
MM_preloadImages('../images/chara/altair/btn_altair_01_roll.gif','../images/chara/altair/btn_altair_02_roll.gif','../images/chara/altair/btn_altair_03_roll.gif','../images/chara/altair/btn_altair_04_roll.gif','../images/chara/altair/btn_altair_05_roll.gif','../images/chara/altair/btn_altair_06_roll.gif');
}

function sub_mualim() {
MM_preloadImages('../images/chara/mualim/btn_mualim_01_roll.gif','../images/chara/mualim/btn_mualim_02_roll.gif','../images/chara/mualim/btn_mualim_03_roll.gif');
}

function sub_robert() {
MM_preloadImages('../images/chara/robert/btn_robert_01_roll.gif','../images/chara/robert/btn_robert_02_roll.gif','../images/chara/robert/btn_robert_03_roll.gif');
}

function sub_tamir() {
MM_preloadImages('../images/chara/tamir/btn_tamir_01_roll.gif','../images/chara/tamir/btn_tamir_02_roll.gif','../images/chara/tamir/btn_tamir_03_roll.gif');
}

function sub_garnie() {
MM_preloadImages('../images/chara/garnie/btn_garnie_01_roll.gif','../images/chara/garnie/btn_garnie_02_roll.gif','../images/chara/garnie/btn_garnie_03_roll.gif');
}


function sub_talal() {
MM_preloadImages('../images/chara/talal/btn_talal_01_roll.gif','../images/chara/talal/btn_talal_02_roll.gif','../images/chara/talal/btn_talal_03_roll.gif');
}


//column
function preloadColumn() {
MM_preloadImages(
				 '../images/column/btn_back_roll.gif',
				 '../images/column/btn_next_roll.gif',
				 '../images/column/place/ph_a_01_roll.gif',
				 '../images/column/place/ph_a_02_roll.gif',
				 '../images/column/place/ph_a_03_roll.gif',
				 '../images/column/place/ph_a_04_roll.gif',
				 '../images/column/place/ph_b_01_roll.gif',
				 '../images/column/place/ph_b_02_roll.gif',
				 '../images/column/place/ph_b_03_roll.gif',
				 '../images/column/place/ph_b_04_roll.gif',
				 '../images/column/place/ph_c_01_roll.gif',
				 '../images/column/place/ph_c_02_roll.gif',
				 '../images/column/place/ph_c_03_roll.gif',
				 '../images/column/place/ph_c_04_roll.gif'
				 );
}

function preloadCulture() {
MM_preloadImages(
				 '../images/column/btn_back_roll.gif',
				 '../images/column/btn_next_roll.gif',
				 '../images/column/culture/btn_culture03_a_roll.gif',
				 '../images/column/culture/btn_culture03_b_roll.gif',
				 '../images/column/culture/btn_culture03_c_roll.gif',
				 '../images/column/culture/btn_culture03_d_roll.gif',
				 '../images/column/culture/ph_culture03_a.gif',
				 '../images/column/culture/ph_culture03_b.gif',
				 '../images/column/culture/ph_culture03_c.gif',
				 '../images/column/culture/ph_culture03_d.gif'
				 );
}

function DetailsOver (type,url){
document.getElementById("detail").style.display = "none";
document.getElementById("detail_a").style.display = "none";
document.getElementById("detail_b").style.display = "none";
document.getElementById("detail_c").style.display = "none";
document.getElementById("detail_d").style.display = "none";
document.getElementById(["detail_"]+type).style.display = "block";
}

function DetailsOut (type,url){
document.getElementById("detail_a").style.display = "none";
document.getElementById("detail_b").style.display = "none";
document.getElementById("detail_c").style.display = "none";
document.getElementById("detail_d").style.display = "none";
document.getElementById("detail").style.display = "block";
}



//download
function preloadWallPaper() {
MM_preloadImages('../images/download/wall/wall_btn_a_roll.gif','../images/download/wall/wall_btn_b_roll.gif','../images/download/wall/wall_btn_c_roll.gif','../images/download/wall/wall_btn_d_roll.gif','../images/download/wall/wall_btn_01_roll.gif')
}
function preloadWebSiteKit() {
MM_preloadImages('../images/download/webkit/webkit_btn_roll.gif');
}
function preloadDown_Movie() {
MM_preloadImages('../images/download/movie/movie_btn_a_roll.gif','../images/download/movie/movie_btn_b_roll.gif','../images/download/movie/movie_btn_c_roll.gif','../images/download/movie/movie_btn_d_roll.gif');
}
//story&world
function preloadWorld() {
MM_preloadImages('../images/story/world/btn_next_roll.gif','../images/story/world/btn_back_roll.gif');
}

function preloadPower() {
MM_preloadImages('../images/story/power/btn_next_roll.gif','../images/story/power/btn_back_roll.gif');
}

function preloadCity() {
MM_preloadImages('../images/story/city/city_btn_a_roll.gif','../images/story/city/city_btn_b_roll.gif','../images/story/city/city_btn_c_roll.gif','../images/story/city/city_btn_d_roll.gif','../images/story/city/city_btn_e_roll.gif');
}

//history & crusader
function preloadhistory() {
MM_preloadImages('../images/story/history/btn_next_roll.gif','../images/story/history/btn_back_roll.gif','../images/story/history/btn_cng_roll.gif');
}


//menu dom

function DommenuClick (type,url){
document.getElementById("type_a").style.display = "none";
document.getElementById("type_b").style.display = "none";
document.getElementById("type_c").style.display = "none";
document.getElementById("type_d").style.display = "none";
document.getElementById(["type_"]+type).style.display = "block";
//
document.getElementById("btn_a").style.visibility = "visible";
document.getElementById("btn_b").style.visibility = "visible";
document.getElementById("btn_c").style.visibility = "visible";
document.getElementById("btn_d").style.visibility = "visible";
document.getElementById(["btn_"]+type).style.visibility = "hidden";
//
//
document.getElementById("a_link").style.display = "block";
document.getElementById("b_link").style.display = "block";
document.getElementById("c_link").style.display = "block";
document.getElementById("d_link").style.display = "block";
document.getElementById(type+["_link"]).style.display = "none";
MM_swapImgRestore();
}


//system
function preloadStealth() {
MM_preloadImages('../images/system/btn_pickup_roll.gif');
}

function preloadFreerunning() {
MM_preloadImages('../images/system/btn_pickup_roll.gif');
}

function preloadAsnation() {
MM_preloadImages('../images/system/an/btn_next_roll.gif','../images/system/an/btn_back_roll.gif');
}

//navigation

function preloadMB1() {
MM_preloadImages(
				 '../images/navigation/mb1/mb1_btn_a_roll.gif',
				 '../images/navigation/mb1/mb1_btn_b_roll.gif',
				 '../images/navigation/mb1/mb1_btn_c_roll.gif',
				 '../images/navigation/mb1/mb1_btn_d_roll.gif'
				 );
}

function preloadMB2() {
MM_preloadImages(
				 '../images/navigation/mb_btn/mb_btn_a_roll.gif',
				 '../images/navigation/mb_btn/mb_btn_b_roll.gif',
				 '../images/navigation/mb_btn/mb_btn_c_roll.gif',
				 '../images/navigation/mb_btn/mb_btn_d_roll.gif',
				 '../images/navigation/mb_btn/mb_btn_e_roll.gif',
				 '../images/navigation/mb2/pan_btn_a_roll.gif',
				 '../images/navigation/mb2/pan_btn_b_roll.gif'
				 );
}

function preloadMB34() {
MM_preloadImages(
				 '../images/navigation/mb_btn/mb_btn_a_roll.gif',
				 '../images/navigation/mb_btn/mb_btn_b_roll.gif',
				 '../images/navigation/mb_btn/mb_btn_c_roll.gif',
				 '../images/navigation/mb_btn/mb_btn_d_roll.gif',
				 '../images/navigation/mb_btn/mb_btn_e_roll.gif',
				 '../images/navigation/mb_btn/mb_btn_f_roll.gif'
				 );
}

function preloadMB3org() {
MM_preloadImages('../images/navigation/mb3/pan_btn_a_roll.gif','../images/navigation/mb3/pan_btn_b_roll.gif');
}

function preloadMB4org() {
MM_preloadImages('../images/navigation/mb4/pan_btn_a_roll.gif','../images/navigation/mb4/pan_btn_b_roll.gif','../images/navigation/mb4/pan_btn_c_roll.gif');
}
//
function preloadTech() {
MM_preloadImages('../images/navigation/technique/pan_btn_a_roll.gif','../images/navigation/technique/pan_btn_b_roll.gif','../images/navigation/technique/pan_btn_c_roll.gif');
}

function preloadTech_1() {
MM_preloadImages('../images/navigation/technique/tech_a_roll.gif','../images/navigation/technique/tech_b_roll.gif','../images/navigation/technique/tech_c_roll.gif','../images/navigation/technique/tech_d_roll.gif','../images/navigation/technique/tech_e_roll.gif');
}

function preloadPlay() {
MM_preloadImages('../images/navigation/play/volume1_btn_roll.gif','../images/navigation/play/volume2_btn_roll.gif','../images/navigation/play/volume3_btn_roll.gif');
}

function preloadPlayVolume() {
MM_preloadImages('../images/navigation/play/pan_btn_a_roll.gif','../images/navigation/play/pan_btn_b_roll.gif','../images/navigation/play/pan_btn_c_roll.gif','../images/navigation/play/pan_btn_top_roll.gif');
}
