﻿var iMGJSversion=13;var tASF='type="application/x-shockwave-flash"';var pASF='pluginspage="http://www.macromedia.com/go/getflashplayer"';function AutoTrans(l) {document.write('<div id=autotrans>Texts have been translated by a machine and are therefore not perfect. Help us to improve the <a href="'+l+'">translations</a>.</div>');};function WinLoc(u) { window.location=u;};function NewXMLHttpRequest() {if (window.XMLHttpRequest) {return new XMLHttpRequest();} else if (window.ActiveXObject) {return new ActiveXObject("Microsoft.XMLHTTP");} else {alert("Your browser does not support XMLHTTP!");return;}};function CheckNewMail(A) {var B=NewXMLHttpRequest();if(B) {B.open("POST",'al_stat.php?'+A,true);param='mode=h';B.setRequestHeader("Content-type","application/x-www-form-urlencoded");B.setRequestHeader("Content-length",param.length);B.setRequestHeader("Connection","close");B.onreadystatechange=function() {if(B.readyState==4) {if(B.responseText>0) {d=document.getElementById('MailIndicator');d.src="/rd/newicons/yougotmail.gif";} else {window.setTimeout("CheckNewMail("+A+")",60000);}}};B.send(param);}};function LangRequest(A) {var B=NewXMLHttpRequest();var C;if(B) {B.open("GET",'xcms.php?l='+A,false);B.send(null);C=B.responseText;};return C;};if(iMGJSversion!=rMGJSversion) if(confirm(LangRequest('FileVersionMismatch'))) window.location.reload();function chkField(p,l) {if(p.value.length<l) {alert(p.name+' '+LangRequest('MsgMandatory'));p.focus();return false;};return true;};function chkEMail(p) {if ((p.value.length<5)||(p.value.indexOf('@')==-1)||(p.value.indexOf('.')==-1)) {alert(p.name+' '+LangRequest('MsgWrongEMail'));p.focus();return false;};return true;};function trim(A) { return A.replace(/^\s*|\s*$/g,"");};function sws(A) {with (document.getElementById('fswitch')) {furl.value=window.location;mode.value=A;action='xcms.php';submit();};return false;};function ReloadTop() { top.location.reload();return true;};function PA(A) {var p=',height=480px,resize=1,scrolling=1,center=1';var i=A.options.selectedIndex;var B=A.options[i].value;var t=A.options[i].text;A.options.selectedIndex=0;c=B.substring(0,1);if (c=="-") {return;} else {if (c=="E") {a="edit_photo.php?"+B;with (dhtmlwindow.open("editwin","iframe",a,t,"width=660px"+p)) { onclose=ReloadTop;};return;} else if (c=="S") {a="picturesales.php?"+B;with (dhtmlwindow.open("editwin","iframe",a,t,"width=640px"+p)) { onclose=ReloadTop;};return;} else if (c=="C") {a="xcms.php?albm?"+B;with (dhtmlwindow.open("editwin","iframe",a,t,"width=800px"+p)) { onclose=ReloadTop;};return;} else if (c=="D") {if(!confirm(t+'?')) return;} else if (c=="f") {t=LangRequest('PromotePhotoHint');if(!confirm(t+'?')) return;} else if (c=="&") {s=window.location.href;i=s.indexOf('&');if(i>0) s=s.substring(0,i);i=s.indexOf('?');if(i==-1) s=s+'?';window.location.href=s+B;return;};sws(B);}};function RestorePicView() {g=document.getElementById('photoblock');g.style.display="block";g=document.getElementById('bbblock');g.style.display="none";window.scrollTo(0,100);};function PostPic() {g=document.getElementById('photoblock');g.style.display="none";g=document.getElementById('bbblock');g.style.display="block";window.scrollTo(0,100);g=document.getElementById('bbform');g.submit();};function adjust_ifr_h(f) {if (f.contentDocument) {h=f.contentDocument.documentElement.offsetHeight+32;} else if (f.contentWindow) {h=f.contentWindow.document.body.scrollHeight+20;} else  {return;};f.setAttribute("height",h);};function GetParameter(d) {s=top.location.href;i=s.indexOf('.html?');if (i!=-1) {s=s.substr(i+6,s.length-1);} else {s=d;};return s;};function CheckFrame() {if(top.frames.length>0) { top.location.href=self.location;};if (window.opener&&window.opener!=window) {if(window.Opera) {self.opener.location=window.location;}}};function CreateTopBanner(d) {banners=new Array('<IMG BORDER="0" alt="www.ModelGraphy.com" SRC="/rd/mgb.jpg">','<IMG BORDER="0" alt="www.ModelGraphy.com" SRC="/rd/mslle.jpg">','<IMG BORDER="0" alt="www.ModelGraphy.com" SRC="/rd/mgan.gif">','<IMG BORDER="0" alt="www.ModelGraphy.com" SRC="/rd/mgakjtl.gif">','<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#4,0,0,0" WIDTH="460" HEIGHT="60"><PARAM NAME="SRC" VALUE="/rd/mg.swf"><EMBED SRC="/rd/mg.swf" '+pASF+' '+tASF+' WIDTH="460" HEIGHT="60"></OBJECT>');l=banners.length;i=Math.floor(Math.random()*l);d.write(banners[i]);};var gtabw=800;var whichlink=0;var whichimage=0;var pixeldelay=(ie55)?document.images.slide.filters[0].duration*1000:0;var opacityx=0;var opacity1=0;function setOpacity(A,B) {B=(B==100)?99.999:B;if(ie55) {A.style.filter="alpha(opacity:"+B+")";return;};A.style.KHTMLOpacity=B/100;A.style.MozOpacity=B/100;A.style.opacity=B/100;};function slideit(){if (!document.images) return;var A=document.getElementsByName('slide')[0];if(!A) return;if(!ie55) {imgx=document.getElementsByName('slidex')[0];if(opacityx==0) {imgx.src=A.src;opacityx=100;setOpacity(imgx,opacityx);opacity1=0;setOpacity(A,opacity1);} else {opacityx-=10;opacity1+=10;setOpacity(A,opacity1);setOpacity(imgx,opacityx);if(opacity1==10) A.src=imageholder[whichimage].src;}} else {if (ie55) A.filters[0].apply();A.src=imageholder[whichimage].src;if (ie55) A.filters[0].play();};if(ie55||opacityx==0) {whichlink=whichimage;whichimage=(whichimage<slideimages.length-1)?whichimage+1:0;setTimeout("slideit()",slidespeed+pixeldelay);} else {setTimeout("slideit()",50);}};function CorrectMapCoords() {o=document.getElementById('lrgimg');w=o.offsetWidth;if(w==0)w=o.style.pixelWidth;h=o.offsetHeight;if(h==0)h=o.style.pixelHeight;o=document.getElementById('previmg');if(o)o.coords='0,0,'+w/3+','+h;o=document.getElementById('nextimg');if(o)o.coords=w/3*2+',0,'+w+','+h;};function CreateIMGh(A,w) {a=(w!="100%"&&THEME=='black')?'800':'';document.write('<IMG SRC="/rd/'+A+a+'.jpg" NAME="slide" BORDER="0" STYLE="filter:progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=15,Duration=1.5)" width="'+w+'">');slideit();};function ClientWidth() {f=window;if (f.document.documentElement) {w=f.document.documentElement.clientWidth;} else if (f.document.body) {w=f.document.body.clientWidth;} else if (f.clientWidth) {w=f.clientWidth;} else if (f.innerWidth) {w=f.innerWidth;} else  {return 0;};return w;};var fw;function ShowBtnCode(A) {if (fw) { if (fw.closed==false)  { fw.close();}};fw=window.open("window.php?bt?"+A,"xxx","left=100,top=100,height=250,width=700,scrollbars");return false;};function HighlightLink(a,c) {u=decodeURIComponent(a.URL);u=u.replace(/\\/g,"");u=u.replace(/\//g,"");t=a.getElementsByTagName("a");n=t.length;for (var i=0;i<n;++i){x=t[i];if(x.href) {h=decodeURIComponent(x.href);h=h.replace(/\//g,"");if (h==u){x.style.color='#FFCC00';}}}};function CenterMenu() {x=document.getElementById('hmenu');if(gtabw==1024) {m=6*120;} else {m=760;};if(x) {w=ClientWidth();if(gtabw=="100%") {w=w-310;w=(m-w)/2-m;} else if(gtabw==800) {w=-(gtabw-m)/2-m;} else if(gtabw==1024) {w=-(gtabw-m)/2-m;} else {w=-gtabw;};x.style.left=w+'px';}};function DoResize() { CenterMenu();};function PageEnd() {CenterMenu();HighlightLink(document,'FFFF00');window.setTimeout("document.getElementById('redmsg').style.visibility=\"hidden\";",15000);window.onresize=DoResize;};function AdOn() { g=document.getElementById('gg');if(g) g.style.visibility='visible';};function AdOff() { g=document.getElementById('gg');if(g) g.style.visibility='hidden';};var slidespeed=5000;function ASet() {if(THEME=='red') {slideimages=new Array("/rd/mgred1.jpg","/rd/mgred2.jpg","/rd/mgred3.jpg");slidelinks=new Array("","","");} else if(THEME=='blue') {slideimages=new Array("/rd/blh1.jpg","/rd/blh2.jpg");slidelinks=new Array("","");} else if(THEME=='white') {slideimages=new Array("/rd/mgws1.jpg","/rd/mgws2.jpg","/rd/mgws4.jpg");slidelinks=new Array("","","");} else {w=ClientWidth();if(gtabw<=800&&gtabw!="100%") {slideimages=new Array("/rd/hm2800.jpg","/rd/hm3800.jpg","/rd/hm4800.jpg","/rd/hm5800.jpg");slidelinks=new Array("","","","");} else if(w>1280) {slideimages=new Array("/rd/mgx1.jpg","/rd/mgx2.jpg","/rd/mgx3.jpg");slidelinks=new Array("","","");} else {slideimages=new Array("/rd/hm2.jpg","/rd/hm3.jpg","/rd/hm4.jpg","/rd/hm5.jpg");slidelinks=new Array("","","","");}}};var imageholder=[];var ie55=window.createPopup;function SLset() {if(THEME!='common') {ASet();for (i=0;i<slideimages.length;i++){imageholder[i]=new Image();imageholder[i].src=slideimages[i];}}};function gotoshow(){};function CreateHeader(w) {gtabw=w;SLset();if(!ie55&&(THEME!='common')) {document.write('<img src="/rd/tr8x8.gif" name="slidex" border=0 style="position:absolute;z-index:3" width="'+w+'">');};if(THEME=='white') { CreateIMGh('mgws1',w);} else if(THEME=='red') { CreateIMGh('mgred1',w);} else if(THEME=='blue') { CreateIMGh('blh1',w);} else if(THEME=='black') { CreateIMGh('mgx1',w);} else {i=Math.floor(Math.random()*13);document.write('<img src="/rd/abmgw'+i+'.jpg" alt="www.ModelGraphy.com" width="'+w+'" name="hdx">');};if(w=="100%") {w=ClientWidth();if(w==0) return;w=w-380;x=w+1;document.write('<style type="text/css">');document.write('.gtab * img { max-width:'+w+'px; expression(this.width > '+x+' ? '+w+': true); }');document.write('</style>');}};function replaceHtml(A,B) {var C=(typeof A==="string"?document.getElementById(A):A);var D=C.cloneNode(false);D.innerHTML=B;C.parentNode.replaceChild(D,C);return D;};function RandHist(r) {n=4;while (n>0&&Hist[n]=='') n-=1;iHist=iHist+r;if(iHist>n) iHist=0;if(iHist<0) iHist=n;h=Hist[iHist];el=document.getElementById('RanImg');el.innerHTML=h;};function addLoadEvent(A) {var B=window.onload;if (typeof window.onload!='function') {window.onload=A;} else {window.onload=function() {if (B) {B();};A();}}};s=window.location.pathname;s.toLowerCase();var Website=window.location.host;function IsLocalFile(t) {e=t.toLowerCase();if((e.indexOf('file://')>-1)||(e.indexOf('src="c')>-1))  { alert(LangRequest("MsgLocalFile"));}};function SetBG(t) {if(THEME=='white') {t.style.background="#ffffc0";} else if(THEME=='red') {t.style.background="#330000";} else if(THEME=='blue') {t.style.background="#444c5b";} else if(THEME=='black') {t.style.background="#000000";} else {t.style.background="#360048";}};function ClrBG(t) {if(THEME=='black') {t.style.background="#222222";} else {t.style.background="transparent";}};var fw=false;function PopWin(s) { if (fw) { if (fw.closed==false)  { fw.close();} } fw=window.open("xcms.php?"+s,"xxx","left=100,top=100,height=500,width=650,scroll");};function GetAge(A) {var n=new Date();yy=n.getFullYear();mm=n.getMonth()+1;dd=n.getDate();y=A.substring(0,4);m=A.substring(5,7);d=A.substring(8,10);t=yy-y-1;if ((mm>m)||((mm==m)&&(dd>=d))) {t=t+1;};if ((t>13)&&(t<99)) {return t;} else {return '';}};function ShowOpera() { if (window.opera) document.writeln('Visual Editing not available for Opera Browsers!');};function CreateIMGPic(A,w) {a=(w!="100%")?'800':'1280';document.write('<IMG SRC="/rd/h'+a+A+'.jpg" NAME="slide" BORDER="0" STYLE="" width="'+w+'">');};function CreateHeaderAL(w) {gtabw=w;document.write('<IMG SRC="/rd/azn-loveheader.jpg" NAME="slide" BORDER="0" STYLE="" width="'+w+'">');if(w=="100%") {w=ClientWidth();if(w==0) return;w=w-380;x=w+1;document.write('<style type="text/css">');document.write('.gtab * img { max-width:'+w+'px; expression(this.width > '+x+' ? '+w+': true); }');document.write('</style>');}};function CreateHeaderPic(w) {gtabw=w;if(THEME=='white') {CreateIMGPic('ws1',w);} else if(THEME=='red') {CreateIMGPic('rd1',w);} else if(THEME=='blue') {CreateIMGPic('gr1',w);} else if(THEME=='black') {CreateIMGPic('bk1',w);} else {CreateIMGPic('ig1',w);};if(w=="100%") {w=ClientWidth();if(w==0) return;w=w-380;x=w+1;document.write('<style type="text/css">');document.write('.gtab * img { max-width:'+w+'px; expression(this.width > '+x+' ? '+w+': true); }');document.write('</style>');}};function fPlayer(n,f,A,B,C) {i=document.getElementById(C);w=i.offsetWidth;h=i.offsetHeight;if(w<400) { w=w*f;h=h*f;};d=document.getElementById(B);a=document.getElementById(A);if(a==null) {a=document.createElement("a");a.setAttribute('id',A);d.appendChild(a);};a.href='http://'+window.location.hostname+n;if(w>0) {a.style.width=w+'px';a.style.height=h+'px';};a.style.display='block';i.style.display='none';flowplayer(A,"/flowplayer/flowplayer-3.1.3.swf");};function OverlayPlayer(n) { fPlayer(n,1,'oplayer','imageContainer','lightboxImage');};function InlayPlayer(n) { fPlayer(n,2,'iplayer','imgcont','lrgimg');};function absPos(A) {var B=curtop=0;if (A.offsetParent) {do { B+=A.offsetLeft;curtop+=A.offsetTop;} while (A=A.offsetParent);return [B,curtop];}};var SOtimer;var SOinput;var SOtext;function checkSOlen(k) {if(SOtimer) clearTimeout(SOtimer);if(!SOinput) {oBody=document.getElementsByTagName("body");oBody=oBody[0];SOinput=document.createElement("div");SOinput.setAttribute('id','SOinput');oBody.appendChild(SOinput);SOtext=LangRequest('SOtext');};a=absPos(k);SOinput.style.left=a[0]+'px';SOinput.style.top=a[1]+k.offsetHeight+'px';SOinput.style.display='block';SOinput.innerHTML=(k.maxLength-k.value.length)+' '+SOtext;SOtimer=window.setTimeout("SOinput.style.display='none';",3000);};function topmenuIEinit(A) {var B=document.getElementById(A).getElementsByTagName("li");for (var i=0;i<B.length;++i) {with (B[i]) {onmouseover=function() { className=className+" ie6hover";};onmouseout=function() { className=className.replace(/ ie6hover/g,"");}}}};
var restarea=6;var maxspeed=3;var maxwidth=1000;var startpos=2;var endofgallerymsg='<span style="font-size: 11px;">End of Gallery</span>';function enlargeimage(A,B,C){var D=typeof B!="undefined"?B:"600px";var E=typeof C!="undefined"?C:"500px";var F="width="+D+",height="+E+",resizable=yes";window.open(A,"",F);};var iedom=document.all||document.getElementById,scrollspeed=0,movestate='',actualwidth='',cross_scroll,ns_scroll,statusdiv,loadedyes=0,lefttime,righttime;function ietruebody(){return (document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;};function creatediv(){statusdiv=document.createElement("div");statusdiv.setAttribute("id","statusdiv");document.body.appendChild(statusdiv);statusdiv=document.getElementById("statusdiv");statusdiv.innerHTML=endofgallerymsg;};function positiondiv(){var A=getposOffset(crossmain,"left"),B=parseInt(crossmain.offsetHeight),C=getposOffset(crossmain,"top");statusdiv.style.left=A+(menuwidth/2)-(statusdiv.offsetWidth/2)+"px";statusdiv.style.top=B+C+"px";};function showhidediv(A){if (endofgallerymsg!="") {positiondiv();statusdiv.style.visibility=A;}};function getposOffset(A,B){var C=(B=="left")?A.offsetLeft:A.offsetTop;var D=A.offsetParent;while (D!=null){C=(B=="left")?C+D.offsetLeft:C+D.offsetTop;D=D.offsetParent;};return C;};function moveleft(){if (loadedyes){movestate="left";if (iedom&&parseInt(cross_scroll.style.left)>(menuwidth-actualwidth)){cross_scroll.style.left=parseInt(cross_scroll.style.left)-scrollspeed+"px";showhidediv("hidden");} else showhidediv("visible");};lefttime=setTimeout("moveleft()",10);};function moveright(){if (loadedyes){movestate="right";if (iedom&&parseInt(cross_scroll.style.left)<0){cross_scroll.style.left=parseInt(cross_scroll.style.left)+scrollspeed+"px";showhidediv("hidden");} else showhidediv("visible");};righttime=setTimeout("moveright()",10);};function motionengine(e){var A=getposOffset(crossmain,"left"),B=(window.pageXOffset)?pageXOffset:ietruebody().scrollLeft,C=(window.pageYOffset)?pageYOffset:ietruebody().scrollTop,D=window.event?event.clientX:e.clientX?e.clientX:"";D-=A-B;var E=(menuwidth-restarea)/2;var F=(menuwidth+restarea)/2;if (D>F){scrollspeed=(D-F)/((menuwidth-restarea)/2)*maxspeed;clearTimeout(righttime);if (movestate!="left") moveleft();} else if (D<E){scrollspeed=(E-D)/((menuwidth-restarea)/2)*maxspeed;clearTimeout(lefttime);if (movestate!="right") moveright();} else scrollspeed=0;};function contains_ns6(a,b) {if (b!==null) while (b.parentNode) if ((b=b.parentNode)==a) return true;return false;};function stopmotion(e){if (!window.opera||(window.opera&&e.relatedTarget!==null)) if ((window.event&&!crossmain.contains(event.toElement))||(e&&e.currentTarget&&e.currentTarget!=e.relatedTarget&&!contains_ns6(e.currentTarget,e.relatedTarget))){clearTimeout(lefttime);clearTimeout(righttime);movestate="";}};function FindClassName(a,A) {r=[];j=0;n=a.length;for (var i=0;i<n;++i) {s=a[i];if (s.className==A) {r[j]=i;j=j+1;}};return r;};function fillup(){if (iedom){crossmain=document.getElementById?document.getElementById("motioncontainer"):document.all.motioncontainer;if(!crossmain) return;if(typeof crossmain.style.maxWidth!=='undefined') crossmain.style.maxWidth=maxwidth+'px';menuwidth=crossmain.offsetWidth;cross_scroll=document.getElementById?document.getElementById("motiongallery"):document.all.motiongallery;actualwidth=document.getElementById?document.getElementById("trueContainer").offsetWidth:document.all['trueContainer'].offsetWidth;if (startpos) if(actualwidth>menuwidth) {imgs=FindClassName(document.images,'minithumbh');l=document.images[imgs[0]].offsetLeft;w2=menuwidth/2;if(l<w2) {p=0;} else if(l>(actualwidth-w2)){p=menuwidth-actualwidth;} else {p=(w2-l);};cross_scroll.style.left=p+'px';crossmain.onmousemove=function(e){ motionengine(e);}};crossmain.onmouseout=function(e){stopmotion(e);showhidediv("hidden");}};loadedyes=1;if (endofgallerymsg!=""){creatediv();positiondiv();};if (document.body.filters) onresize()};addLoadEvent(fillup);onresize=function(){if (typeof motioncontainer!=='undefined'&&motioncontainer.filters){motioncontainer.style.width="0";motioncontainer.style.width="";motioncontainer.style.width=Math.min(motioncontainer.offsetWidth,maxwidth)+'px';};menuwidth=crossmain.offsetWidth;cross_scroll.style.left=startpos?(menuwidth-actualwidth)/startpos+'px':0;};

