// JavaScript Document //=== php part // dependance(publicity0) // E:\myproducts_sites\strangers\education\build\jslib\publicity0.js.php // //=== function startpublicity0(params){ /// timeoutID=window.setTimeout(slowAlert, 2000); ////window.setTimeout(showpublicity0,tempopublicity0);//c 5000 try{ ///window.setTimeout(showpublicity0,5000);//c 5000 jskpublicity0.tempo ///window.setTimeout(showpublicity0.bind(null,'pubxyz'), 5000); if(params)window.setTimeout(showpublicity0.bind(null,params),params['tempo']); }catch(e){alert('lj:12/publicity0.js.php e='+e);} } function test_values_publicity(tag){ ////alert("lj:14/puplicity0.js.php -> jskpublicity0="); try{ var theme=(tag?tag:'pubxyz'); ///jskpublicity0.tag); ///'ebook_publicity'); ///alert('lj:17/puplicity0.js.php -> '+theme); var div=$Prot('id_'+theme); /// if(!div){ ///alert('lj:20/puplicity0.js.php -> problem div='+theme); return(false); ///} ///alert('lj:18/puplicity0.js.php -> '+theme); //c id_ref20160731213607 /// var dir=uPointerId('id_'+'dir_'+theme);if(!dir)return(false); var dir=$Prot('id_'+'dir_'+theme);if(!dir)return(false); var imagesfiles=$Prot('id_'+'images_'+theme);if(!imagesfiles)return(false); var imageshttp=$Prot('id_'+'http_'+theme);if(!imageshttp)return(false); var imagestitles=$Prot('id_'+'titles_'+theme);if(!imagestitles)return(false); var imagesnummber=$Prot('id_'+'number_'+theme);if(!imagesnummber)return(false); var imagesperiod=$Prot('id_'+'period_'+theme);if(!imagesperiod)return(false); /// alert('lj:17 ici '+jskpublicity0.tag+' - '+tag+' - '+theme); var images=imagesfiles.value.split(';'); var https=imageshttp.value.split(';'); var titles=imagestitles.value.split(';'); /// alert('lj:27/puplicity0.js.php ->'+titles+' - '+imagestitles.value); return(new Array(images,https,titles,dir,div,imagesnummber,imagesperiod)); }catch(e){alert('lj:40/publicity0.js.php e='+e);} } function goto_http_publicity0_site(tag){ try{ if(tag)jskpublicity0.tag=tag; var arr=test_values_publicity(tag);if(!arr)return(false);//c return(new Array(images,https,dir,div,imagesnummber)); var https=arr[1],imagesnummber=arr[arr.length-2],number=Number(imagesnummber.value); ////alert("That was really slow! : "+https+' - '+number+' - '+https[number]); ///window.location.assign("http://www.w3.org"); if(https[number])window.open(https[number]); ///"http://www.w3.org"); }catch(e){alert('lj:52/publicity0.js.php e='+e);} } function showpublicity0(params){ ///alert("That was really slow! params="+params+" - tested="+tested); /*
*/ try{ var arr=test_values_publicity(); if(!arr)return(false);//c return(new Array(images,https,dir,div,imagesnummber)); var images=arr[0],https=arr[1],titles=arr[2],dir=arr[3],div=arr[4],imagesnummber=arr[arr.length-2],number=Number(imagesnummber.value),period=Number(arr[arr.length-1].value); ///alert('lj:52/puplicity0.js.php -> tag='+'ebook_publicity'+' - images='+images); number=(number>=images.length-1?0:number+1); imagesnummber.value=number; var url=dir.value+'/'+images[number]; /// alert(images+' - '+number+' - '+"url('"+url+"')"); div.style.backgroundImage="url("+url+")"; //// alert(number+' - '+titles); div.title=titles[number]; window.setTimeout(showpublicity0.bind(null,params), params['tempo']); //// window.setTimeout(showpublicity0.bind(null,'pubxyz'), 5000); //// window.setTimeout(showpublicity0,period);/// 5000); }catch(e){alert('lj:82/publicity0.js.php e='+e);} }