import flash.display.*; function loadBitmapSmoothed(url:String, target:MovieClip) { // Create a movie clip which will contain our // unsmoothed bitmap var bmc:MovieClip = target.createEmptyMovieClip("bmc", target.getNextHighestDepth()); // Create a listener which will notify us when // the bitmap loaded successfully var listener:Object = new Object(); // Track the target listener.tmc = target; // If the bitmap loaded successfully we redraw the // movie into a BitmapData object and then attach // that BitmapData to the target movie clip with // the smoothing flag turned on. listener.onLoadInit = function(mc:MovieClip) { mc._visible = false; var bitmap:BitmapData = new BitmapData(mc._width, mc._height, true); this.tmc.attachBitmap(bitmap, this.tmc.getNextHighestDepth(), "auto", true); bitmap.draw(mc); }; // Do it, load the bitmap now var loader:MovieClipLoader = new MovieClipLoader(); loader.addListener(listener); loader.loadClip(url, bmc); } var mainObj = _root.parsed_obj; var galleryObj = _root.gallery_obj; function textSelectable(selectedObject) { isTextSelected = getSettingsValue(mainObj, "textSelectable", "item"); if (isTextSelected == "true") { selectedObject.selectable = true; } } function getXmlSection(obj, itemName, sectionName) { i = 0; while (obj[itemName][i]) { if (obj[itemName][i].name == sectionName) { returnedResult = true; return (i); break; } i++; } } function getSettingsValue(obj, itemName, itemType) { sectionNum = getXmlSection(obj, "section", "settings"); k = 0; while (obj["section"][sectionNum][itemType][k]) { if (obj["section"][sectionNum][itemType][k].name == itemName) { return (obj.section[sectionNum][itemType][k].value); break; } k++; } } function getSettingsValueByName(textObj, sname, emded) { textObj.htmlText = getSettingsValue(mainObj, sname, "item"); textSelectable(textObj); if (embed == undefined || embed == null) { textObj.embedFonts = needToEmbedFonts(textObj.htmlText); } else { textObj.embedFonts = embed; } } function getSubLink(textObj, num) { sectionNum = getXmlSection(mainObj, 'section', 'pages'); currentPage = _root.link-_root.firstPageFrame; var fontFamily = mainObj['section'][sectionNum]['page'][currentPage]['sublinks'][0]['link'][num]['fontFamily']; textObj.htmlText = mainObj['section'][sectionNum]['page'][currentPage]['sublinks'][0]['link'][num].value; textSelectable(textObj); if (embed == undefined || embed == null) { textObj.embedFonts = needToEmbedFonts(textObj.htmlText); } else { textObj.embedFonts = embed; } } function getFontFamily(obj, sectionName, itemType, targetItem):String { sectionNum = getXmlSection(obj, 'section', sectionName); return getAttributeValue(obj['section'][sectionNum][itemType], targetItem); } function getAttributeValue(where, targetItem):String { if (isNaN(targetItem)) { k = 0; while (where[k]) { if (where[k].name == targetItem) { return where[k]['fontFamily']; break; } k++; } } else { return where[targetItem]['fontFamily']; } } function getCopyright(textObj, embed) { textObj.htmlText = getSettingsValue(mainObj, "copyright", "item"); textSelectable(textObj); if (embed == undefined || embed == null) { textObj.embedFonts = needToEmbedFonts(textObj.htmlText); } else { textObj.embedFonts = embed; } } function getCompanyName(textObj, embed) { textObj.htmlText = getSettingsValue(mainObj, "companyName", "item"); textSelectable(textObj); if (embed == undefined || embed == null) { textObj.embedFonts = needToEmbedFonts(textObj.htmlText); } else { textObj.embedFonts = embed; } } function getCompanyName2(textObj, embed) { textObj.htmlText = getSettingsValue(mainObj, "companyName2", "item"); textSelectable(textObj); if (embed == undefined || embed == null) { textObj.embedFonts = needToEmbedFonts(textObj.htmlText); } else { textObj.embedFonts = embed; } } function getSlogan(textObj, embed) { textObj.htmlText = getSettingsValue(mainObj, "slogan", "item"); textSelectable(textObj); if (embed == undefined || embed == null) { textObj.embedFonts = needToEmbedFonts(textObj.htmlText); } else { textObj.embedFonts = embed; } } function getSystemValue(textObj, systemOptionName) { textObj.htmlText = getSettingsValue(mainObj, systemOptionName, "item"); textSelectable(textObj); } function getMenuLink(textObj, linkNum, embed) { sectionNum = getXmlSection(mainObj, "section", "menu"); textObj.htmlText = mainObj["section"][sectionNum].link[linkNum].value; textSelectable(textObj); if (embed == undefined || embed == null) { textObj.embedFonts = needToEmbedFonts(textObj.htmlText); } else { textObj.embedFonts = embed; } } function getMenuSystemOrder(linkNum) { sectionNum = getXmlSection(mainObj, "section", "menu"); return (mainObj["section"][sectionNum].link[linkNum].systemOrder); } function getMenuNameByLink(textObj, linkNum, embed) { sectionNum = getXmlSection(mainObj, "section", "center_menu"); for (var i:Number = 0; i_root.pagesReadMoreFrame or _root.link<>_root.pagesReadMoreFrame+1) { if( _root.link != _root.pagesReadMoreFrame ) { _root.link_prev = _root.link; } _root.menu["item" + _root.link].gotoAndPlay("s2"); if (number==999999) { sectionNum=getXmlSection(mainObj, "section", "privacyPolicy"); titleNum=getXmlSection(mainObj.section[sectionNum], "item", "pageTitle"); title2Num=getXmlSection(mainObj.section[sectionNum], "item", "pageTitle2"); textNum=getXmlSection(mainObj.section[sectionNum], "item", "pageText"); _root.readPrivTitle=mainObj.section[sectionNum]["item"][titleNum].value; _root.readPrivTitle2=mainObj.section[sectionNum]["item"][title2Num].value; _root.readPrivText=mainObj.section[sectionNum]["item"][textNum].value; _root.readPrivTitleFont=mainObj.section[sectionNum]["item"][titleNum]['fontFamily']; _root.readPrivTitle2Font=mainObj.section[sectionNum]["item"][title2Num]['fontFamily']; _root.readPrivTextFont=mainObj.section[sectionNum]["item"][textNum]['fontFamily']; _root.link=_root.pagesReadMoreFrame+1; } else { sectionNum=getXmlSection(mainObj, "section", "pages"); linkCount=checkLinkType("readMoreLink", number); i=0; linkTitleNum=getXmlSection(mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount], "item", "title"); linkTitle2Num=getXmlSection(mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount], "item", "title2"); linkTextNum=getXmlSection(mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount], "item", "linkText"); _root.readMoreTitle=mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount]["item"][linkTitleNum].value; _root.readMoreTitle2=mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount]["item"][linkTitle2Num].value; _root.readMoreText=mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount]["item"][linkTextNum].value; _root.readMoreTitleFont = mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount]["item"][linkTitleNum]['fontFamily']; _root.readMoreTitle2Font = mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount]["item"][linkTitle2Num]['fontFamily']; _root.readMoreTextFont = mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount]["item"][linkTextNum]['fontFamily']; _root.link=_root.pagesReadMoreFrame; } _root.pagess.gotoAndPlay("s1"); } } */ _root.readMoreFrameType = 'readmore'; function more_click_func(number) { tempNumber = number.split(" "); number = tempNumber.join(""); number = number.toLowerCase(); num = _root.pagesReadMoreFrame; currentPage = _root.link-_root.firstPageFrame; if (isNaN(Number(number))) { readMoreType = number; } else { readMoreType = 'readmore'; } if (_root.link<>num || _root.readMoreFrameType != readMoreType) { if (_root.link != _root.pagesReadMoreFrame) { _root.link_prev = _root.link; } _root.menu["item"+Number(getMenuOrderNumByLink(_root.link)+1)].gotoAndPlay("s2"); if (number == 'privacypolicy') { _root.readMoreFrameType = 'privacypolicy'; sectionNum = getXmlSection(mainObj, "section", "privacyPolicy"); imageNum = getXmlSection(mainObj.section[sectionNum], "item", "pageImage"); titleNum = getXmlSection(mainObj.section[sectionNum], "item", "pageTitle"); title2Num = getXmlSection(mainObj.section[sectionNum], "item", "pageTitle2"); textNum = getXmlSection(mainObj.section[sectionNum], "item", "pageText"); _root.readPrivImageUrl = mainObj.section[sectionNum]["item"][imageNum]['imageUrl']; _root.readPrivImageLink = mainObj.section[sectionNum]["item"][imageNum]['link']; trace( _root.readPrivImageUrl ) trace( _root.readPrivImageLink ) _root.readPrivTitle = mainObj.section[sectionNum]["item"][titleNum].value; _root.readPrivTitle2 = mainObj.section[sectionNum]["item"][title2Num].value; _root.readPrivText = mainObj.section[sectionNum]["item"][textNum].value; _root.readPrivTitleFont = mainObj.section[sectionNum]["item"][titleNum]['fontFamily']; _root.readPrivTitle2Font = mainObj.section[sectionNum]["item"][title2Num]['fontFamily']; _root.readPrivTextFont = mainObj.section[sectionNum]["item"][textNum]['fontFamily']; } else if (number == 'termsofuse') { _root.readMoreFrameType = 'termsofuse'; sectionNum = getXmlSection(mainObj, "section", "termsOfUse"); titleNum = getXmlSection(mainObj.section[sectionNum], "item", "pageTitle"); textNum = getXmlSection(mainObj.section[sectionNum], "item", "pageText"); imageNum = getXmlSection(mainObj.section[sectionNum], "item", "pageImage"); _root.termsTitle = mainObj.section[sectionNum]["item"][titleNum].value; _root.termsText = mainObj.section[sectionNum]["item"][textNum].value; _root.termsImageUrl = mainObj.section[sectionNum]["item"][imageNum]['imageUrl']; _root.termsImageLink = mainObj.section[sectionNum]["item"][imageNum]['link']; } else { _root.readMoreFrameType = 'readmore'; sectionNum = getXmlSection(mainObj, "section", "pages"); linkCount = checkLinkType("readMoreLink", number); i = 0; linkImageNum = getXmlSection(mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount], "item", "pageImage"); linkTitleNum = getXmlSection(mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount], "item", "title"); linkTitle2Num = getXmlSection(mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount], "item", "title2"); linkTextNum = getXmlSection(mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount], "item", "linkText"); _root.readMoreImageUrl = mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount]["item"][linkImageNum]['imageUrl']; _root.readMoreImageLink = mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount]["item"][linkImageNum]['link']; _root.readMoreTitle = mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount]["item"][linkTitleNum].value; _root.readMoreTitle2 = mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount]["item"][linkTitle2Num].value; _root.readMoreText = mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount]["item"][linkTextNum].value; _root.readMoreTitleFont = mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount]["item"][linkTitleNum]['fontFamily']; _root.readMoreTitle2Font = mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount]["item"][linkTitle2Num]['fontFamily']; _root.readMoreTextFont = mainObj["section"][sectionNum]["page"][currentPage]["link"][linkCount]["item"][linkTextNum]['fontFamily']; } _root.link = num; _root.gotoAndPlay("s1"); } } function getContactFormText(textObj, textNumber, embed) { sectionNum = getXmlSection(mainObj, "section", "contactForm"); textObj.htmlText = mainObj["section"][sectionNum]["texts"][0]["pageText"][textNumber].value; textSelectable(textObj); if (embed == undefined || embed == null) { textObj.embedFonts = needToEmbedFonts(textObj.htmlText); } else { textObj.embedFonts = embed; } } function getContactFormParams() { sectionNum = getXmlSection(mainObj, "section", "contactForm"); ContactFormParams = new Array(); servNum = getXmlSection(mainObj["section"][sectionNum], "item", "serverOption"); recNum = getXmlSection(mainObj["section"][sectionNum], "item", "recipient"); ContactFormParams['rec'] = mainObj["section"][sectionNum]["item"][recNum].value; ContactFormParams['serv'] = mainObj["section"][sectionNum]["item"][servNum].value; return (ContactFormParams); } // gallery functions function getGallerySystemProperty(propName) { sectionNum = getXmlSection(galleryObj, "section", "systemOptions"); propNum = getXmlSection(galleryObj["section"][sectionNum], "option", propName); return (galleryObj["section"][sectionNum]["option"][propNum].value); } function getGallerySettings(propName) { sectionNum = getXmlSection(galleryObj, "section", "settings"); propNum = getXmlSection(galleryObj["section"][sectionNum], "option", propName); return (galleryObj["section"][sectionNum]["option"][propNum].value); } function getGalleryImage(imageNum, categoryNum) { sectionNum = getXmlSection(galleryObj, "section", "imagesData"); imageParams = new Array(); image = galleryObj["section"][sectionNum]["category"][categoryNum]["image"][imageNum]; nameNum = getXmlSection(image, "item", "imageUrl"); commentNum = getXmlSection(image, "item", "imageComment"); imageParams['name'] = image['item'][nameNum].value; imageParams['comment'] = image['item'][commentNum].value; return (imageParams); } function getCurrentGalleryName(categoryNum) { sectionNum = getXmlSection(galleryObj, "section", "imagesData"); return (galleryObj["section"][sectionNum]["category"][categoryNum].name); } function getCurrentGalleryFolder(categoryNum) { sectionNum = getXmlSection(galleryObj, "section", "imagesData"); return (galleryObj["section"][sectionNum]["category"][categoryNum].folderID); } function getCountCategoryImages(categoryNum) { sectionNum = getXmlSection(galleryObj, "section", "imagesData"); i = 0; flag = "true"; while (flag == "true") { if (!galleryObj["section"][sectionNum]["category"][categoryNum]['image'][i]) { flag = "false"; } else { i++; } } return (i); } function getNumberByname(imageName, categoryNum) { sectionNum = getXmlSection(galleryObj, "section", "imagesData"); imageCount = 0; flag = "true"; while (flag == "true") { if (galleryObj["section"][sectionNum]["category"][categoryNum]['image'][imageCount]) { imageObject = galleryObj["section"][sectionNum]["category"][categoryNum]["image"][imageCount]; nameNum = getXmlSection(imageObject, "item", "imageUrl"); if (imageObject['item'][nameNum].value == imageName) { imageNum = imageCount; flag = "false"; return (imageNum); } imageCount++; } else { flag = "false"; } } } function getReadMoreTitle(textObj, embed) { textObj.htmlText = _root.readMoreTitle; _root.textSelectable(textObj); if (embed == undefined || embed == null) { textObj.embedFonts = needToEmbedFonts(textObj.htmlText); } else { textObj.embedFonts = embed; } } function getReadMoreTitle2(textObj, embed) { textObj.htmlText = _root.readMoreTitle2; _root.textSelectable(textObj); if (embed == undefined || embed == null) { textObj.embedFonts = needToEmbedFonts(textObj.htmlText); } else { textObj.embedFonts = embed; } } function getReadMoreText(textObj, embed) { textObj.htmlText = _root.readMoreText; _root.textSelectable(textObj); if (embed == undefined || embed == null) { textObj.embedFonts = needToEmbedFonts(textObj.htmlText); } else { textObj.embedFonts = embed; } } function needToEmbedFonts(sourceText:String):Boolean { if (sourceText) { var fontFaces:Array = new Array(); var searchString:String = ' FACE='; var fromIndex:Number = 0; var currentIndex:Number = (sourceText.toUpperCase()).indexOf(searchString, fromIndex); while (currentIndex != -1) { var startQuoteIndex:Number = currentIndex+searchString.length; var quoteType:String = sourceText.charAt(startQuoteIndex); var endQuoteIndex:Number = sourceText.indexOf(quoteType, startQuoteIndex+1); fontFaces.push(sourceText.substring(startQuoteIndex+1, endQuoteIndex)); fromIndex = currentIndex+1; currentIndex = (sourceText.toUpperCase()).indexOf(searchString, fromIndex); } var counter:Number; // Check FontsManager if (_root.fm && !_root.fm.libraryLoadingError) { for (counter=0; counter