var path = "http://"+document.domain+"/"; var sinte=null; var mscon=null; var mslid=0; function my_messages() { var r = false; if(mscon == null) { var b=document.getElementById('body'); mscon = document.createElement("DIV"); mscon.className = "message_con"; mscon.id = "message_con"; b.insertBefore(mscon,b.firstChild); r = true; } else { if(mscon.style.display == "") { mscon.style.display = "none"; r = false; } else { mscon.style.display = ""; r = true; } } if(r) { /*read new message*/ post="get=all&lid="+mslid; system_i.push_last(new Array(path+"get_message.php",post,function(val){ o = eval(val); o = o[0]; if(!window.mstxt) { window.mstxt = document.getElementById('mstxt'); } mstxt.innerHTML = o.msg; mslid = o.lid; for(var x=0;x= 97 && myKeyCode <= 122) { return true; } if (myKeyCode >=65 && myKeyCode <=90) { return true; } if (myKeyCode == 45 || myKeyCode == 95) { return true; } return false; } function isNumeric(myKeyCode) { if (myKeyCode >= 48 && myKeyCode <=57) { return true; } return false; } function isSpace(myKeyCode) { if (myKeyCode == 32) { return true; } } function isDot(myKeyCode) { switch(myKeyCode) { case 46://. return true; break; default: return false; break; } } function show_search(h) { var s = document.getElementById("search"); if(s) if(h) s.style.display = "none"; else s.style.display = ""; return false; } function getParent(o,name) { var c=0 while(true) { var p = o.parentNode; if(p.tagName == name) return p; else o=p; if(c++>100) break; } } /*function getElementByIdParent(el,tag,id) { getElementsByTagName() }*/ function getElementsByClassNameParent(el,className) { var cn = null; if(!document.getElementsByClassName) { cn = getElementsByClassName(className,"DIV"); } else cn = document.getElementsByClassName(className); for(var x=0; x= 0 && s >= 0 && d >= 0) return c; } return false; } var Base64 = { // private property _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", // public method for encoding encode : function (input) { var output = ""; var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i = 0; input = Base64._utf8_encode(input); while (i < input.length) { chr1 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; if (isNaN(chr2)) { enc3 = enc4 = 64; } else if (isNaN(chr3)) { enc4 = 64; } output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4); } return output; }, // public method for decoding decode : function (input) { var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (i < input.length) { enc1 = this._keyStr.indexOf(input.charAt(i++)); enc2 = this._keyStr.indexOf(input.charAt(i++)); enc3 = this._keyStr.indexOf(input.charAt(i++)); enc4 = this._keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 != 64) { output = output + String.fromCharCode(chr2); } if (enc4 != 64) { output = output + String.fromCharCode(chr3); } } output = Base64._utf8_decode(output); return output; }, // private method for UTF-8 encoding _utf8_encode : function (string) { string = string.replace(/\r\n/g,"\n"); var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c); } else if((c > 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128); } else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); } } return utftext; }, // private method for UTF-8 decoding _utf8_decode : function (utftext) { var string = ""; var i = 0; var c = c1 = c2 = 0; while ( i < utftext.length ) { c = utftext.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++; } else if((c > 191) && (c < 224)) { c2 = utftext.charCodeAt(i+1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2; } else { c2 = utftext.charCodeAt(i+1); c3 = utftext.charCodeAt(i+2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3; } } return string; } } function oposX (x, o) { if (!document.layers) { var onWindows = navigator.platform ? navigator.platform == "Win32" : false; var macIE45 = document.all && !onWindows && getExplorerVersion() == 4.5; var par = o; var lastOffset = 0; while(par){ if( par.leftMargin && ! onWindows ) x += parseInt(par.leftMargin); if( (par.offsetLeft != lastOffset) && par.offsetLeft ) x += parseInt(par.offsetLeft); if( par.offsetLeft != 0 ) lastOffset = par.offsetLeft; par = macIE45 ? par.parentElement : par.offsetParent; } } else if (o.x) { x += o.x; alert(x);} return x; } function oposY (y, o) { if(!document.layers) { var onWindows = navigator.platform ? navigator.platform == "Win32" : false; var macIE45 = document.all && !onWindows && getExplorerVersion() == 4.5; var par = o; var lastOffset = 0; while(par){ if( par.topMargin && !onWindows ) y += parseInt(par.topMargin); if( (par.offsetTop != lastOffset) && par.offsetTop ) y += parseInt(par.offsetTop); if( par.offsetTop != 0 ) lastOffset = par.offsetTop; par = macIE45 ? par.parentElement : par.offsetParent; } } else if (o.y >= 0) y += o.y; return y; } var roimg; function clk(id,url) { if(document.images) { var a=encodeURIComponent||escape,b=new Image; roimg=b; b.onerror=b.onload=b.onabort=function(){ delete roimg if(url && url != "") { openUrl(url); } }; var l=window.location+""; var i=(new Date).getTime(); b.src=path+"purl?pr="+id+"&loc="+URLEncode(l).replace(/\+/g,"%2B")+"&t="+i; } return false; }; function URLEncode (clearString) { var output = ''; var x = 0; clearString = clearString.toString(); var regex = /(^[a-zA-Z0-9_.]*)/; while (x < clearString.length) { var match = regex.exec(clearString.substr(x)); if (match != null && match.length > 1 && match[1] != '') { output += match[1]; x += match[1].length; } else { if (clearString[x] == ' ') output += '+'; else { var charCode = clearString.charCodeAt(x); var hexVal = charCode.toString(16); output += '%' + ( hexVal.length < 2 ? '0' : '' ) + hexVal.toUpperCase(); } x++; } } return output; } //function clk2(d,e,f,j,k,l,m) //{ // if(document.images) // { // var a=encodeURIComponent||escape,b=new Image,g=window.google.cri++; // window.google.crm[g]=b; // b.onerror=b.onload=b.onabort=function(){ // delete window.google.crm[g] // }; // var c,h,i; // if(google.v6) // { // c=google.v6.src;h=google.v6.complete||google.v6s?2:1;i=(new Date).getTime()-google.v6t;delete google.v6 // } // b.src=["/url?sa=T","&source="+google.sn,e?"&oi="+a(e):"",f?"&cad="+a(f):"","&ct=",a(j||"res"),"&cd=",a(k),"&ved=",a(m),d?"&url="+a(d.replace(/#.*/,"")).replace(/\+/g,"%2B"):"","&ei=",google.kEI,c?"&v6u="+a(c)+"&v6s="+h+"&v6t="+i:"",l].join("") // } // return true //}; function showimg(o) { document.getElementById("nimg").src = o.href; } function occlick(o, t) { var c = document.getElementById(t); if(c) { if(c.style.display == "") { c.style.display = "none"; if(o) o.className = "crs arrd"; } else { c.style.display = ""; if(o) o.className = "crs arru"; } } } function OpedDialog(data){ var dil = CreateDialogBox(); if(typeof data == "object"){ if(!data.img){ $(dil).find("div.head img").css("visibility","hidden") } var wind = $(dil).find(".pop_form_B"); if(data.title != "") wind.find(".head").get(0).innerHTML = data.title; var con = wind.find("div.content").get(0); $(con).css("position","relative"); if(data.height == 'auto'){ data.height = 600; data.maxHeight = 600; } if(data.height != 'auto' && data.height != '') $(con).css("height",data.height+"px"); if(data.info && data.info != ""){ $(con).find('.value').get(0).innerHTML = data.info; if($(con).height() < 60) $(con).css("height","60px"); if(data.maxHeight && $(con).height() > data.maxHeight) $(con).css("height",data.maxHeight+"px").css("overflow-y","scroll"); } else{ $(con).css("height","60px"); } $(con).css("width",data.width+"px"); $(wind).css("width",data.width+"px"); $(wind).css("left",(($(window).width()-data.width)/2)+"px"); $(wind).css("top",(($(window).height()-data.height)/2)+"px"); $(con).find("div.bg").css("width",data.width+"px"); $(con).find("div.bg").css("height",data.height+"px"); if(data.button && typeof data.button == "object"){ for (var i in data.button){ if(data.button[i] == 'close') $("#"+i).get(0).onclick = function(e){ if(dil.parentNode) dil.parentNode.removeChild(dil); }; else $("#"+i).get(0).onclick = data.button[i]; } } var but = wind.find(".close_popup").get(0); but.onclick = function(e){ if(dil.parentNode) dil.parentNode.removeChild(dil); }; } $("#popup").get(0).appendChild(dil); return dil; } function CreateDialogBox(){ var box = '
' +'
' +'
' +'
Edit Profile
' +'
' +'
' +'
' +'
' +'
' +'
' +'
' +'
' +'
' +'
' +'
' +'
' +'
' +'
' +'
'; var pop = $("#popuptemp").get(0); pop.innerHTML += box; return pop.lastChild; } function formSubmit(o){ var f = findParent(o,'FORM'); if(f != false) f.submit(); return false; } function findParent(o,tagName){ var par = o.parentNode; if(typeof par == undefined || par == null) return false; if(par.tagName != tagName) return findParent(par, tagName); else return par; } /**/ function wrong_link(idlink){ post="idlink="+idlink; system_i.push_last(new Array(path+"sendAlert-wrong_link.php",post,function(val){ o = eval(val); o = o[0]; OpedDialog({title:o.title, info:Base64.decode(o.content), img:"", width:"420", height:"174", maxHeight:"400", button:{ "button_cancel":"close" } }); })); return false; }